def weight(subj):
    return {"MA": 1.2, "PH": 1.1, "CH": 1.1, "BI": 1.0, "CS": 1.0}.get(subj, 1.0)
assert weight("MA")==1.2 and weight("EN")==1.0
print("SELF-TEST PASS")