# -*- coding: utf-8 -*-
import io, sys, os, re, html
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
t=open("_rice11c_epmp_prog.txt",encoding="utf-8").read()
for kw in ["Chemical","Civil","Materials","Bioengineering","MBE","MChE","MCEE","MMSNE","credit","credit hours","non-thesis","professional","STEM"]:
    for m in re.finditer(re.escape(kw),t,re.I):
        seg=re.sub(r"\s+"," ",html.unescape(t[max(0,m.start()-60):m.start()+170]))
        print(f"[{kw}] {seg}")
        break
