import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine

main = do
  [a,b] <- getIntList
  putStrLn $ if a < b then check' a b else check' b a

check' a b = concat $ replicate b $ show a