import Control.Applicative
import Data.Char (intToDigit)

main :: IO ()
main = solve <$> f >>= putStrLn
  where
    f = map read <$> words <$> getLine

solve :: [Int] -> String
solve [a, b]
  | a > b = replicate a $ intToDigit b
  | otherwise = replicate b $ intToDigit a
