let input = require('fs').readFileSync( '/dev/stdin', 'utf8' );
let arr = input.split("\n");
for (let i = 0; i < arr.length; i++) {
    let Arr = arr[i].split(" ").map(Number);
    let H = Arr[0];
    let W = Arr[1];
    if (H === 0 && W === 0) break;
    let str = '';
    for (let i = 0; i < H; i ++) {
        for (let i = 0; i < W; i ++) {
            str += '#';
        }
        str += '\n';
    }
    console.log(str);
}
