import Control.Monad (liftM2)
import Data.List (group)


lookAndSay :: Integer -> Integer
lookAndSay = read                                   
           . concatMap                              
               (liftM2 (++) (show . length)         
                            (take 1))               
           . group                                  
           . show                                   


lookAndSay2 :: Integer -> Integer
lookAndSay2 = read . concatMap (liftM2 (++) (show . length)
                                            (take 1))
            . group . show



lookAndSay3 :: Integer -> Integer
lookAndSay3 n = read (concatMap describe (group (show n)))
  where describe run = show (length run) ++ take 1 run

main = mapM_ print (iterate lookAndSay 1)