let n = read_int () let rec f x = if x = 0 then [] else string_of_int x :: f (x-1) let rec g lst x = if x = 0 then [] else List.append lst (g lst (x-1)) let () = print_endline (List.fold_left (^) "" (g (f n) n))