#1:???????????????H?????°????????????puts
#2:1???????\????????????????????????§??°?????????
#3:loop do if??????break
loop do
    h, w = gets.chomp.split.map(&:to_i)
    if h == 0 && w == 0
        break
    end
    h.times do |line|
        line = "#" * w
        puts "#{line}"
    end
    puts ""
end