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

void main() {
	auto input = getStdin!(string[]);
	foreach (line; input) {
		auto num = line.split(" ");
		int w = num[0].to!(int);
		int h = num[1].to!(int);
		if (w == 0 && h == 0) {
			break;
		}
		for (int i_w = 0; i_w < w; i_w++) {
			for (int j_h = 0; j_h < h; j_h++) {
				"#".write;
			}
			"".writeln;
		}
		"".writeln;
	}
}

T getStdin(T)() {
    string[] cmd;
    string line;
    while ((line = chomp(stdin.readln())) != "") cmd ~= line;
    return to!(T)(cmd);
}