const lines = require("fs").readFileSync("/dev/stdin", "utf8").split("\n");
let i = 0;
while(true) {
  const [h, w] = lines[i++].split(" ").map(Number);
  if (!h&&!w) break;
  console.log(`${"#".repeat(w)}\n`.repeat(h));
}

