gets.to_i.times do n=gets.to_i mod=1000000007 puts (gets.split.map(&:to_i).map{|x|x+=1}.inject(:*)%mod-1)%mod end