import           Data.Char (intToDigit)

main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine
  putStrLn $ solve a b

solve :: Int -> Int -> String
solve a b = min (replicate b a') (replicate a b') where
  a' = intToDigit a
  b' = intToDigit b
