wide = []
high = []
count = 0

while wide[count-1] != 0 && high[count-1] != 0
	high[count],wide[count] = gets.split().map(&:to_i)
	count += 1
end 

for countC in 0...count-1
	for countH in 0...high[countC]
		for countW in 0...wide[countC]
			print '#'
		end
		puts ""
	end
	puts "\n"
end