#! /usr/bin/python3
# Last edited on 2026-05-20 08:17:03 by stolfi

import sys, os, re
from sys import stdin as rd, stdout as wr, stderr as err

def main():
  rd.reconfigure(encoding='utf-8')
  wr.reconfigure(encoding='utf-8')
  
  for line in rd:
    line = line.strip()
    if line != "" and line[0] == "<":
      line = re.sub(r"[：].*$", "", line)
      line = re.sub(r"[、，\［\］。\（\）；]", "", line)
      line = re.sub(r"[ ]+", " ", line)
      loc = line[1:9]
      tit = line[11:]
      wr.write(f"{loc} {len(tit):2d} {tit}\n")
  wr.flush()
  return
  # ----------------------------------------------------------------------

main()
 
