main = do
    n <- readLn
    if n == 0 then return () else do
        s <- getLine
        putStrLn $ iterate operate s !! n
        main

operate :: String -> String
operate "" = ""
operate (c:cs) = operate' cs c 1
    where
    operate' [] c' n        = (show n) ++ [c']
    operate' (c:cs) c' n
        | c == c'           = operate' cs c' (n+1)
        | otherwise         = (show n) ++ c' : operate' cs c 1