import Control.Applicative

main :: IO ()
main = do
  [x, y] <- fmap read . words <$> getLine
  if (x, y) == (0, 0)
  then do 
    loop x y
    putStrLn ""
    main
  else
    return ()
  where
    loop a b
      | a > 0 = do
        putStrLn ['#' | _ <- [1..b]]
        loop (a-1) b
      | otherwise = return ()
      
  
