import Control.Applicative

main :: IO ()
main = do
    [a, b] <- map read . words <$> getLine
    putStrLn $ solve a b

solve :: Int -> Int -> String
solve a b = concatMap show (min (replicate a b) (replicate b a))


