m@main=getLine>>=putStrLn.unwords.(\[x,y]->[l:[r]|l<-x,r<-y]).words>>m