import Control.Applicative
import Control.Monad

drawRectangle :: [Int] -> IO ()
drawRectangle [h, w] = replicateM_ h (putStrLn $ replicate w '#')

parser :: IO()
parser = do
    args <- (map (read :: String -> Int) . words) <$> getLine
    if (args == [0, 0])
    then return ()
    else do
        drawRectangle args
        putStrLn ""
        parser

main = parser