Shil has an array of N elements A1 , A2, ... ,AN . He also has an integer K. He wants to find out value of Square Sum for every i from 1 to N-K+1.
The value of Square Sum for certain i is defined as  Σ1≤ j ≤ K (j^2 Ai+j-1).

Input:
First line of input consists of two integers N and K. Next line consists of N integers A1 , A2, ... ,AN.

Output:
Output N-K+1 integers where ith integer corresponds to Square Sum of i. Print Square Sum modulus 10^9+7.

Constraints:
1≤ K ≤ N ≤ 10^6 
1≤ Ai ≤ 10^9

SAMPLE INPUT
6 3
6 9 10 10 4 6 

SAMPLE OUTPUT
132 139 86 80
n=raw_input().split(" ")
a=[]
n[0]=int(n[0])
n[1]=int(n[1])
var=raw_input().split(" ")
for i in range(n[0]):
	a.append(int(var[i]))

ans=[]
prev=0
cumu=[2*a[0],]

for i in range(1,n[0]):
    cumu.append(cumu[-1]+2*a[i])

result=0
sub=0

for i in range(n[1]):
    result+=(i+1)*(i+1)*a[i]
    result%=1000000007
    sub+=(2*i+1)*(a[i])
    sub%=1000000007

ans.append(result)

prev=0
for j in range(n[1],n[0]):
    result+=n[1]*n[1]*a[j]
    result-=sub
    result%=1000000007
    result+=1000000007
    result%=1000000007
    sub-=a[prev]
    sub-=cumu[j-1]-cumu[prev]
    sub+=(2*n[1]-1)*(a[j])
    sub%=1000000007
    sub+=1000000007
    sub%=1000000007
    ans.append(result)
    prev+=1
	
for i in ans:
	print i,