import std.stdio;
import std.string;
import std.algorithm;
import std.conv;
import std.array;
import std.math;

void main()
{
    foreach(line; stdin.byLine)
    {
        auto hw = line.chomp.split.map!(to!int);
        auto h = hw[0], w = hw[1];
        if(h == 0 && w == 0) return;

        foreach(i; 0 .. h){
            foreach(j; 0 .. w)
                write('#');
            writeln();
        }
        writeln();
    }
}