import Control.Applicative
main = do
    [h, w] <- (map read . words) <$> getLine
    printARectangle h w

printARectangle :: Int -> Int -> IO()
printARectangle 0 0 = putStr ""
printARectangle h w
    | h == 0 = do
        putStrLn ""
        [h, w] <- (map read . words) <$> getLine
        printARectangle h w
    | otherwise = do
        putStrLn $ replicate w '#'
        printARectangle (h - 1) w