module Main where

import Data.Char

duplicate :: Int -> Int -> String
duplicate num times = [c | _ <- [1..times]]
  where
    c = chr (num + 0x30)

main :: IO ()
main =
  (map (read :: String -> Int) . words) <$> getLine >>= \[a, b] ->
  let
    aa = duplicate a b
    bb = duplicate b a
  in case aa `compare` bb of
    EQ -> putStrLn aa
    LT -> putStrLn aa
    GT -> putStrLn bb