main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine :: IO [Int]
  let str1 = foldr (++) "" $ map (\_ -> show a) [1..b] :: String
  let str2 = foldr (++) "" $ map (\_ -> show b) [1..a] :: String
  putStrLn $ if length str1 >= length str2 then str1 else str2