import Control.Monad import Data.Maybe import qualified Data.ByteString.Char8 as B main = do [sa,pa,_] <- B.words <$> B.getLine [sb,pb,_] <- B.words <$> B.getLine let sa' = B.unpack sa let sb' = B.unpack sb let pa' = (fst . fromJust . B.readInteger) pa let pb' = (fst . fromJust . B.readInteger) pb putStrLn (if pa'>pb' then sa' else if pa'