module Main where

import Data.Functor

main :: IO ()
main =  do
 { [h,w] <- getInts
 ; if h == 0 && w == 0 then done
   else putStrLn (unlines (rectangle h w)) >> main
 }


rectangle :: Int -> Int -> [String]
rectangle h w = replicate h (replicate w '#')

done :: IO ()
done = return ()

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