import Control.Monad

main = do
  s <- getLine
  let [x,y] = map (read ::String->Int) $ words s in
    if x /= 0 && y /= 0 then do
      forM_ [1..x] $ \ i -> do
        forM_ [1..y] $ \ j ->
          putStr "#"
        putStr "\n"
      putStr "\n"
      main
    else
      return ()