solve :: Int -> Int -> String
solve a b =
    min (rp a b) (rp b a)
    where 
        rp :: Int -> Int -> String
        rp n c = concat $ replicate n $ show c

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