toInt :: (String -> Int)
toInt x = read x ::Int

getInts = do
  x <- getLine
  let y = (map$toInt)$words x
  return y



a_bTimes :: Char -> Int -> String
a_bTimes a 0 = ""
a_bTimes a n = a:(a_bTimes a (n-1))

main = do
  x <- getLine
  let a = x !! 0
  let b = x !! 2
  putStrLn $ if a < b then a_bTimes a (read [b])
                      else a_bTimes b (read [a])