g=getLine m@main=((g>>=).(f.).(.words).zipWith(++).words=<>m f(x:y)=putStrLn$show([z|(z,w)<-zip[1..]y,w==x]!!0)++' ':x