import Control.Monad

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

solve :: Int -> Int -> String
solve a b = (join $ map show $ replicate a b) `min` (join $ map show $ replicate b a)