import Control.Applicative
import Control.Monad
import Data.Function

main :: IO ()
main =
    fix $ \loop -> do
        [a,b] <- map read . words <$> getLine
        unless ([a,b] == [0,0]) $ do
            replicateM_ a (putStrLn (replicate b '#'))
            putStrLn ""
            loop
