main :: IO () main = do s <- getLine if s == "ham" then putStrLn s else putStrLn $ s ++ "ham"