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
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 26 21:46:05 2016

@author: acer
"""

from sys import stdin
n,k = map(int,stdin.readline().strip().split())
a = [0] + map(int,stdin.readline().strip().split())
#print a
pre = [0]
for i in xrange(1,n+1):
	pre.append(pre[i-1] + a[i])
#print pre
st = 0
rem = 0
for i in xrange(1,k+1):
	st += i*i*a[i]
for i in xrange(k):
	rem += (2*i+1)*a[i+1]
hi = 10**9 + 7
print st%hi,
#print rem
for i in xrange(2,n):
	j = i+k-1
	if j>n:
		break
	#print i,j
	#st-=a[i]
	st += k*k*a[j]
	st-=rem
	rem-= a[i-1]
	pr = pre[j-1] - pre[i-1]
	#print "rem ",pr
	rem-= 2*pr
	rem += (2*k-1)*a[j]
	print st%hi,