import Data.List
import Data.Char

main = getLine >>= putStrLn . func . map read . words

func :: [Int] -> String
func [a, b]
  | a < b = concat $ replicate b (show a)
  | otherwise = concat $ replicate a (show b)