loop do
  h, w = gets.split.map!(&:to_i)
  break if h == 0 || w == 0
  h.times do |i|
    w.times do |j|
      print "#"
      if j == w then 
        print "\n"
      end
    end
  if h == i  
    print "\n" 
  end
  end
end