module Main where

import Control.Applicative
import Text.Printf
import Numeric

main :: IO ()
main = loop

loop :: IO ()
loop = do
   { [h, w] <- getInts
   ; if h == 0 && w == 0 then return ()
     else do
       { let oneline = replicate w '#'
       ; let rect    = replicate h oneline
       ; putStr $ unlines rect 
       ; putStrLn ""
       ; loop
       }
    }  

--

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

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show

getDoubles :: IO [Double]
getDoubles = map read . words <$>getLine


putDoubles :: [Double] -> IO ()
putDoubles = putStrLn . unwords . map showDouble

showDouble :: Double -> String
showDouble x = showFFloat Nothing x ""

readInt :: String -> Int 
readInt = read 

getStrings :: IO [String]
getStrings = words <$> getLine
