import Control.Applicative
main = do
    [h, w] <- map (read :: String -> Int) . words <$> getLine
    if h == 0 && w == 0
        then return ()
        else do
            putStr . unlines $ (replicate h (replicate w '#'))
            putStr "\n"
            main