
arr = []
while true
  x, y = gets.split(" ").map(&:to_i)

  break if x.zero? && y.zero?
  arr << [ x, y ]
end

arr.each do |val|
  side = ""
  val[0].times do
    val[1].times do
      side += "#"
    end
    side += "\n"
  end
  puts side
  puts "\n"
end