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

void main() {
    string row;
    foreach (i; 0 .. 300) row ~= "#";
    while (true) {
        int[] tmp = readln.chomp.split.to!(int[]);
        int h = tmp[0], w = tmp[1];
        if (h == 0 && w == 0) break;
        foreach (i; 0 .. h) row[0..w].writeln;
        writeln;
    }
}
