data = readlines

data.each{|rect|
    h,w = rect.split.map(&:to_i)
    
    if (w == 0) && (h == 0)
        break
    end
    h.times{|n|
        w.times{|n| print '#'}
        puts
    }
    puts
}
