import std.stdio,
	   std.string,
	   std.conv,
	   std.algorithm,
	   std.range,
	   std.math;

void main()
{
	while(true){
		auto ip = readln.split.to!(int[]), h = ip[0], w = ip[1];
		if(h == 0 && w == 0) break;
		else{
			string W;
			foreach(j; 0..w){
					W ~= "#";
			}
			foreach(i; 0..h){
				W.writeln;
			}
			" ".writeln;
		}
	}
}
