let () =
  let rec makeN n m = if m = 0 then "" else n ^ (makeN n (m-1)) in
  let ios = int_of_string in
  Scanf.scanf "%s %s\n" @@ fun a b ->
  Printf.printf "%d\n" @@ (if a < b then (ios (makeN a (ios(b)))) else (ios (makeN b (ios(a)))))