import sys, re

body = sys.stdin.read()

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

for i, m in enumerate(hrefs[:10]):
    href = m.group(1)
    pos = m.start()
    # Context around the href
    ctx = body[max(0,pos-200):pos+300]
    # Find the title attribute
    title_m = re.search(r'title="([^"]*)"', ctx)
    title = title_m.group(1) if title_m else ''
    # Find date in before context
    dates = re.findall(r'(\d{4}-\d{2}-\d{2})', body[max(0,pos-300):pos])
    date_str = dates[-1] if dates else ''
    print(f"[{i+1}] TITLE: [{title[:80]}] DATE: [{date_str}] HREF: [{href}]")
