import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B

main :: IO ()
main = solve <$> f >>= B.putStrLn
  where
    f = head <$> B.words <$> B.getLine

solve :: ByteString -> ByteString
solve bs
  | B.last bs == 's' = B.snoc (B.snoc bs 'e') 's'
  | otherwise = B.snoc bs 's'
