main=interact f f x=x++'\n':do(y,_:z)<-[span(' '<)x];f$y++z