We have N bulbs arranged on a number line, numbered 1 to N from left to right. Bulb i is at coordinate i.  Each bulb has a non-negative integer parameter called intensity. When there is a bulb of intensity d at coordinate x, the bulb illuminates the segment from coordinate x-d-0.5 to x+d+0.5. Initially, the intensity of Bulb i is A_i. We will now do the following operation K times in a row:    * For each integer i between 1 and N (inclusive), let B_i be the number of bulbs illuminating coordinate i. Then, change the intensity of each bulb i to B_i.  Find the intensity of each bulb after the K operations.
N, K = map(int, input().split())
A = list(map(int, input().split()))
B = [0]*len(A)
n_max = 2*10**5
for _ in range(K):
  for i in range(N):
    if A[i] > N:
      continue
    for j in range(max(0, i-A[i]), min(len(B), i+A[i]+1)):
      B[j]+=1
  A = B.copy()
  B = [0] * len(A)
print(A)
import numpy as np
from numba import njit

N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))


@njit
def search(a):
  B = np.zeros_like(a)
  for i in range(N):
    l = max(0, i-a[i])
    r = min(N-1, i+a[i])
    B[l]+=1
    if r+1 < N:
      B[r+1]-=1
  B = np.cumsum(B)
  return B

for _ in range(K):
  A = search(A)
  if min(A) == N:
      break
A = map(str, A)
print(' '.join(A))