import Data.List m@main=do l<-getLine;putStrLn$snd(span(`isInfixOf`l)$mapM(:"abcde")" ">>=words)!!0;m