import re, sys, io, urllib.request, ssl
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
ctx = ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE
def probe(url):
    try:
        req = urllib.request.Request(url, headers={"User-Agent":"Mozilla/5.0"})
        with urllib.request.urlopen(req, timeout=10, context=ctx) as resp:
            body=resp.read().decode("utf-8","ignore")
            return resp.status, len(body), body
    except urllib.error.HTTPError as e:
        return e.code, 0, ""
    except Exception as e:
        return "ERR", 0, str(e)[:60]

urls = [
 "https://graduateschool.nd.edu/admissions/",
 "https://graduateschool.nd.edu/admissions/tuition-and-fees",
 "https://bursar.nd.edu/tuition-fees/",
 "https://bursar.nd.edu/",
 "https://graduateschool.nd.edu/financial-support/",
]
for u in urls:
    st, ln, body = probe(u)
    print(f"{st} {ln}  {u}")
    if st==200:
        m=re.findall(r'https?://[^"\'<>\s]*tuition[^"\'<>\s]*', body)
        if m: print("   ", list(dict.fromkeys(m))[:5])
    print()
