def paint(arr)
	arr.each{|i|
		a = []
		i.each{|j|
			a << j
		}
		a[0].times{
			img = ""
			a[1].times{
				img << "#"
			}
			puts img
		}
		puts ''
	}
end

input_arr = []
while input = gets
	h, w = input.split(' ').map(&:to_i)
	break if (h == 0 && w == 0)
	input_arr << [h, w]
end

paint(input_arr)