module Main where

import           Control.Applicative
import           Data.List

main :: IO ()
main = do
    [m, n] <- map read . words <$> getLine
    putStrLn $ solve2 m n

solve2 :: Int -> Int -> String
solve2 m n | m <= n = concat $ replicate n (show m)
           | m > n  = concat $ replicate m (show n)

