# -*- coding: utf-8 -*-
import io, sys, json, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
d = json.load(open(r"D:\work buddy\2026-11-05-14-15-52\raw_berkeley.json", encoding="utf-8"))
print("n=", len(d))
for i, x in enumerate(d):
    c = x["cells"]
    title = c[0].replace("Graduate Program", "").strip()
    dtype = c[2].replace("Degree Type", "").strip() if len(c) > 2 else ""
    print(f"{i+1:3}|{dtype[:16]:16}|{title}")
