def draw_rec(h, w)
	h.times do
		w.times do
			print("#")
		end
		puts ""
	end
	puts ""
end

inputs = gets.strip().split(" ")
h  = inputs[0].to_i
w  = inputs[1].to_i

until h == 0 && w == 0
	draw_rec(h, w)
	inputs = gets.strip().split(" ")
	h  = inputs[0].to_i
	w  = inputs[1].to_i		
end
