import re
RULES=[('plumbing',r'tap|toilet|drain|drinking fountain|pipe|water'),('electrical',r'light|outlet|switch|power|breaker'),('hvac',r'thermostat|heating|ventilation|air conditioner|cooling|boiler'),('carpentry',r'door|lock|shelf|window|hinge'),('custodial',r'spill|soap|waste|bins|mop|clean|mud'),('grounds',r'grass|shrub|leaves|irrigation|sprinkler|lawn')]
def baseline(t):
    t=t.lower()
    # Conservative exceptions and uncertain-language guard; first keyword trade wins.
    if re.search(r'gas smell|water.*ceiling light|burning smell by|exit door.*will not open|cannot tell|cannot identify|unsure|no further details',t):return 'review'
    for route,pattern in RULES:
        if re.search(pattern,t):return route
    return 'review'
