# -*- coding: utf-8 -*-
import io, sys, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")

for fn in ["_cornell_meng_guide.txt", "_cornell_faq.txt", "_cornell_pay.txt", "_cornell_admit.txt"]:
    try:
        t = open(fn, encoding="utf-8").read()
    except Exception as e:
        print(f"== {fn} 缺失 {e}"); continue
    print(f"\n========== {fn} ({len(t)} chars) ==========")
    for kw in ["TOEFL", "IELTS", "2.70", "2.50", "application fee", "$105", "STEM", "OPT",
               "Tier 1", "tuition", "GPA", "waiver", "GTRS", "recommend", "GRE"]:
        i = t.lower().find(kw.lower())
        if i >= 0:
            print(f"[{kw}] ...{t[max(0,i-120):i+220].strip()}...")
