
function main(input){
    let lines = input.split("\n");
    let i = 0;
    while(lines[i]!=="0 0"){
        render(lines[i]);
        i++;
        console.log();
    }

    
}
function render(line){
    let args = line.split(" ").map(x=>parseInt(x));
    let row = "";
    for(let i=0;i<args[1];i++){
        row += "#";
    }
    for(let i=0;i<args[0];i++){
        console.log(row);
    }
}


main(require("fs").readFileSync("/dev/stdin","utf-8"));
