import Data.List

main = do
  str <- getLine
  let [a, b] = words str
  if a < b
    then putStrLn $ mkStr b a
    else putStrLn $ mkStr a b
      where mkStr x y = intercalate "" $ take (read x ::Int) $ repeat y
