while true do
    i = gets
    h = i.split[0].to_i
    w = i.split[1].to_i
    break if h == 0 && w == 0
    h.times do
        w.times do
            print "#"
        end
        print "\n"
    end
    print "\n"
end
