
h,w = gets.split(" ").map(&:to_i) #??????????????\??????????????????
puts "%d %d" % [h,w]


for countH in 0...h # ??????????´????H????????????

	for count in 0...w # ?¨????????????¢????????????
		print '#'
	end
	print "\n"

end