
process.stdin.resume();
process.stdin.setEncoding('utf8');
// ???????????????????¨??????§
// Let's ?????£??¬????????????
process.stdin.on('data', function (chunk) {
    var line = chunk.toString().split('\n);
    var H = parseInt(line[0],10);
    var W = parseInt(line[1],10);

     if(H == 0 && W == 0){break};

   for (var i=0; i<H; i++){
     for(var j=0; j<W j++){
        console.log("#");  
    }
        console.log("\n");
}

});