process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', function (chunk) {

var line = chunk.split(' ').map(Number);
var H = Number(line[0]);
var W = Number(line[1]);

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

var i , j;
for(i = 0; i < H; i++){
for(j = 0; i < W; i++){
 process.stdout.write("#");
}
process.stdout.write('\n');
}
});