# -*- coding: utf-8 -*-
import io, re, collections
h = io.open("index_main.html", encoding="utf-8", newline="").read()
seg = h[h.index("const PROGRAMS=["):h.index("const CATD=[")]
print("LVL", collections.Counter(re.findall(r'lvl:"([^"]*)"', seg)).most_common(8))
print("LVLANY", len(re.findall(r'lvl:', seg)))
s = h[h.index("const VERIFIED_DETAILS"):]
e = s.index("]);")
t = s[:e]
print("HEAD", t[:200].replace("\n", " "))
print("QUOTED", len(re.findall(r'"[^"]+"', t)))
print("COMMAS", t.count(","))
print("SETSIZE", len(set(re.findall(r'"[^"]+"', t))))
