#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;

int main()
{
    string ans = "Yes";
    int h, w;
    cin >> h >> w;
    vector<string> S(h);
    for (int i = 0; i < h; ++i)
    {
        cin >> S[i];
    }
    int dx[4] = {1, -1, 0, 0};
    int dy[4] = {0, 0, 1, -1};
    for (int i = 0; i < h; ++i)
    {
        for (int j = 0; j < w; ++j)
        {
            if (S[i][j] == '#')
            {
                bool can = false;
                for (int k = 0; k < 4; ++k)
                {
                    int ni = i + dx[k];
                    int nj = j + dy[k];
                    if (ni < 0 || ni > h - 1)
                    {
                        continue;
                    }
                    if (nj < 0 || nj > w - 1)
                    {
                        continue;
                    }
                    if (S[ni][nj] == '#')
                    {
                        can = true;
                    }
                }
                if (can == false)
                {
                    ans = "No";
                }
            }
        }
    }
    cout << ans << endl;
}
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main(){
    int n,k;
    cin>>n>>k;
    vector<int>a(n);
    rep(i,n)cin>>a[i];
    rep(i,k){
        vector<int>sum(n);
        rep(j,n){
            int l=max(0,j-a[j]);
            int r=min(n,j+a[j]+1);
            sum[l]++;
            if(r!=n)sum[r]--;
        }
        rep(j,n-1)sum[j+1]+=sum[j];
        bool same=true;
        rep(j,n){
            if(a[j]!=sum[j])same=false;
            a[j]=sum[j];
        }
        if(same)break;
    }
    rep(i,n)cout<<a[i]<<" ";
}