import std.stdio;
void main() {
	int w, h;
	for (;;) {
		"%d %d\n".readf(&w, &h);
		if (w == 0 && h == 0) break;
		foreach (j; 0..w) {
			foreach (i; 0..h) "#".write;
			"".writeln;
		}
		"".writeln;
	}
}