-- Structured Program I - Print a Rectangle

import Control.Applicative

main :: IO ()
main = do
  xs <- map words . takeWhile (/= "0 0") . lines <$> getContents
  mapM_ putStrLn $ map rectangle xs

rectangle :: [String] -> String
rectangle [h, w] = concat $ replicate (read h) $ replicate (read w) '#' ++ "\n"

