import System.Exit

main = do
    xs <- getLine
    let (w:h:[]) = map read $ words xs
    case (w,h) of
        (0, 0) -> exitSuccess
        _      -> mapM_ putStrLn $ replicate h $ replicate w '#'
    putStrLn ""
    main
