import Control.Applicative ((<$>), (<*>)) import Control.Monad (replicateM) main :: IO () main = do solve <$> getLine <*> replicateM 8 getLine >>= putStrLn solve :: String -> [String] -> String solve s bs = let n = sum . map (length . filter (== '.')) $ bs in if even n then s else next s next :: String -> String next "yukiko" = "oda" next "oda" = "yukiko"