import Control.Applicative
import Control.Monad
import Data.List
import qualified Data.Map as M
import Text.Printf

readInts :: IO [Int]
readInts = map read . words <$> getLine

main :: IO ()
main = do
  [h, w] <- readInts
  when ((h, w) /= (0, 0)) $ do
    forM_ [1..h] $ \_ -> do
      putStrLn $ replicate w '#'
    putChar '\n'
    main

