process.stdin.setEncoding('utf-8');
process.stdin.on('data', (input) => {
  var arry = input.split(' ').map(Number);
  var h = arry[0];
  var w = arry[1];

  if (!h && !w)
    process.exit();

  var result;
  for (var i = 0; i < h; i++) {
    result = "";
    for (var j = 0; j < w; j++) {
      result += "#";
      console.log(result);
    }
    console.log("");
  }
})

