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

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

main = do
  [na, nb] <- getIntList
  let (a:_) = show na
      (b:_) = show nb
      sa = replicate nb a
      sb = replicate na b
      ans = if sa < sb then sb else sb
  putStrLn ans