import Data.List
main = interact $ unwords . english_sentence . words
english_sentence s = [mostfreq, mostlong]
 where
  mostfreq = (head . head . reverse . sort . group . sort) s
  mostlong = foldr1 (\s1 s2 -> if length s1 > length s2 then s1 else s2) s