import Data.List.Split

toInt :: String -> Int
toInt = read :: String -> Int

makeString :: Int -> Int -> String
makeString a b
  | a < b = concat $ replicate b (show a)
  | otherwise = concat $ replicate a (show b)

main = do
  s <- getLine
  let l = splitOn " " s
  let a = toInt (l !! 0)
  let b = toInt (l !! 1)
  putStrLn $ makeString a b
