while true

	aryMondai = gets.split.map(&:to_i);
	
	num1 = aryMondai[0];
	num2 = aryMondai[1];
	
	if num1 == 0 && num2 == 0 then
		break;
	end
	
	for i in 0..num1-1 do
		
		for j in 0..num2-1 do
		
		print "#";
		
		end
		
		print "\r\n";
	end
	
	print "\r\n";
end