import sys, re

body = sys.stdin.read()

# Find all href="/public/263/XXXXXX.html"
hrefs = list(re.finditer(r'href="(/public/263/\d+\.html)"', body))
print(f"Total /public/263/ links: {len(hrefs)}")

for i, m in enumerate(hrefs[:8]):
    href = m.group(1)
    pos = m.start()
    # Get 400 chars before this href
    before = body[max(0,pos-400):pos]
    # Find title attribute in the before context (it should be before the href)
    titles = re.findall(r'title="([^"]*)"', before)
    title = titles[-1] if titles else ''
    # Find date in the before context
    dates = re.findall(r'(\d{4}-\d{2}-\d{2})', before)
    date_str = dates[-1] if dates else ''
    print(f"[{i+1}] TITLE: [{title[:80]}] DATE: [{date_str}] HREF: [{href}]")
