import Data.List step = concatMap (\s -> (show $ length s) ++ [head s]) . group main = do mapM_ putStrLn $ take 10 $ iterate step "1"