import Control.Applicative
import Data.List

rectangle :: Int -> Int -> String
rectangle 0 w = ""
rectangle h w = (replicate w '#') ++ "\n" ++ (rectangle (h-1) w)

main = do
{
    l <- map (map (read::String->Int) . words) . init . lines <$> getContents;
    let{
        sqs = [ rectangle (x!!0) (x!!1)  | x<-l ];
    };
    mapM_ putStrLn $ sqs;
}