import sys
from bs4 import BeautifulSoup

html = sys.stdin.read()
soup = BeautifulSoup(html, 'html.parser')
mc = soup.select_one('div.main_c')
if not mc:
    print("NO main_c div found")
    sys.exit(1)

for i, child in enumerate(mc.children):
    if hasattr(child, 'name'):
        txt = child.get_text(" ", strip=True)
        print(f'Child {i}: <{child.name}> class={child.get("class",[])} text="{txt[:80]}"')
        if child.name == 'p':
            for j, gc in enumerate(child.children):
                if hasattr(gc, 'name'):
                    print(f'  GC {j}: <{gc.name}> class={gc.get("class",[])}')
