Scanf.scanf "%d %d" @@ fun a b ->
  let sa, sb = string_of_int a, string_of_int b in
  let ab = String.init b (fun i -> sa.[0]) in
  let ba = String.init a (fun i -> sb.[0]) in
  List.sort compare [ab; ba]
  |> List.hd |> print_endline
