while 6: a=raw_input();s=[];m='failed at: ' while a: x=a[0];a=a[1:] if x in'{[<(':s+=[x] elif 0[])