let n = read_int () let rec f x = if x = 10 then f 9 else 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) ^ (if n = 10 then "0000000000" else ""))