n,k = list(map(int,input().split()))

a = list(map(int,input().split()))

imos = [0]*(2*10**5+1)

for j in range(min(k,700)):

    imos = [0]*(2*10**5+1)

    for i in range(n):

        imos[max(i-a[i],0)] += 1

        imos[min(i+a[i]+1,2*10**5)] -= 1

    for i in range(1,n):

        imos[i] += imos[i-1]

    a = imos

print((*imos[:n]))
n,k = list(map(int,input().split()))

a = list(map(int,input().split()))

imos = [0]*(2*10**5+1)

for j in range(min(k,100)):

    imos = [0]*(2*10**5+1)

    for i in range(n):

        imos[max(i-a[i],0)] += 1

        imos[min(i+a[i]+1,2*10**5)] -= 1

    for i in range(1,n):

        imos[i] += imos[i-1]

    a = imos

print((*imos[:n]))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
imos = [0] * (2 * 10**5 + 1)
for j in range(min(k, 700)):
    imos = [0] * (2 * 10**5 + 1)
    for i in range(n):
        imos[max(i - a[i], 0)] += 1
        imos[min(i + a[i] + 1, 2 * 10**5)] -= 1
    for i in range(1, n):
        imos[i] += imos[i - 1]
    a = imos
print((*imos[:n]))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
imos = [0] * (2 * 10**5 + 1)
for j in range(min(k, 100)):
    imos = [0] * (2 * 10**5 + 1)
    for i in range(n):
        imos[max(i - a[i], 0)] += 1
        imos[min(i + a[i] + 1, 2 * 10**5)] -= 1
    for i in range(1, n):
        imos[i] += imos[i - 1]
    a = imos
print((*imos[:n]))

-for j in range(min(k, 700)): +for j in range(min(k, 100)):