The Head Chef is interested in studying interactions between his chefs . There are  N  chefs with ids 1 to N . Each chef trusts some of the other chefs . The relation of trust is one way . Also , a chef may trust chefs only with ids strictly greater than his/her id .A chef with id = i , trusts the chefs with next ni id's.  
The Head Chef wants to know given a chef B and a set of chefs S,  how many lines of trust exist between each element of S and B . A line of trust between chefs A and B is a sequence of chefs a1 ... ak starting at A ( a1 = A )and finishing at B  (Ak = B) such that Ai trusts A(i+1)  for all i ( 1 to k-1) . Two lines of trust are different if they have a different chef at the some position in the line . 

Since the answer may be quite large , output it modulo 1000000007 .

Input

The first line contains a two space seperated integers N and  B denoting the number of chefs and the target chef for whom the lines of trust have to be calculated.  
The next  N lines contains an integer  ni denoting the number of chefs which are trusted by the chef with id = i .  
 The next line contains a single integer  Q  denoting the number of queries 
 The next  Q  lines contain elements of set S .


Output

Output a single line for each query containing the answer to the query.


Constraints

1 ≤ N ≤ 200000
1 ≤ B ≤ N
1 ≤ Q ≤ 100000
1 ≤ Each element of set S  < B
1 ≤ i + ni ( for i = 1 to N )  ≤ N
0 ≤ ni ( for i = 1 to N )  ≤ N - 1


Example
Input:
3 3
2
1
0
2
1
2
Output:
2
1

Explanation
Example case 1. The lines of trust between 1 and 3 are 
1 , 3 
1 , 2 ,3 
There is one line of trust between 2 and 3 which is 
2 3
n,b = map(int,raw_input().split())
a = [0]
for i in range(n):
	a.append(int(raw_input()))

dp = []
ss = []
for i in range(n+2):
	dp.append(0)
	ss.append(0)
	
dp[b] = 1
ss[b] = 1
M = 1000000007


for i in range(b-1,0,-1):
	dp[i] = (ss[i+1]-ss[i+a[i]+1])%M
	ss[i] = (dp[i] + ss[i+1])%M
	
q = int(raw_input())
for i in range(0,q):
	print dp[int(raw_input())]