m@main=getLine>>=putStrLn.(""#)>>m x@ ~(a:s)#y@(b:t)|elem b"([{<"=(b:x)#t|a0="failed at: "++y ""#_="yes" x#_=x#"EOL"