main@m=getLine>>=mapM(print.(1*).fst).reads>>m