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

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

main = do
    [a, b] <- getIntList
    if a < b then print (solve b a) else print (solve a b)

solve :: Int -> Int -> Int
solve n m = read . concat . map show . take m $ repeat n