m@main=getLine>>=putStrLn.foldl1(#).words>>m w#l=[c!filter(/=c)l|c<-w] _![e]=e c!_=c