import sys _dic={ 'reset board':'board fault', 'board add': 'where to add', 'board delete':'no board at all', 'reboot backplane':'impossible', 'backplane abort':'install first', 'he he':'unknown command' } for line in sys.stdin: ot='unknown command' l=line.strip().split(' ') if len(l)==1: if l[0] in 'reset': ot='reset what' elif len(l)==2: get=0 for k in _dic.keys(): kl=k.split(' ') if l[0] in kl[0] and l[1] in kl[1]: ot=_dic[k] get+=1 if get!=1: ot='unknown command' else: pass print(ot)