import std.stdio, std.array, std.conv, std.string;

void main() {
  while (true) {
    string[] input = split(readln());
    int h = to!int(input[0]);
    int w = to!int(input[1]);

    if (h == 0 && w == 0) return;

    for (int i = 0; i < h; ++i) {
      for (int j = 0; j < w; ++j) {
        write("#");
      }
      writeln("");
    }

    writeln("");
  }
}