import std.stdio,std.string,std.conv,std.array,std.algorithm;
void main(){
	for(;;write("\n")){
		auto a = readln().chomp().split();
		if( a[0]=="0" && a[1]=="0" ){	break;	}
		foreach(y;0..to!int(a[0])){
			foreach(x;0..to!int(a[1])){ write("#"); }
			write("\n");
		}
		
	}
}