#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0;i < (n);i++)
using ll = long long;
const ll MOD=1000000007;
const double pi=acos(-1);





int main() 
{
  ll N,K; cin>>N>>K;
  vector<ll> A(N);
  rep(i,N)
  {
    cin>>A.at(i);
  }
  rep(i,min(K,(ll)100))
  {
    vector<ll> hoge(N,0);
    vector<ll> sirusi(N,0);
    rep(j,N)
    {
      sirusi.at(max((ll)0,j-A.at(j)))++;
      if(j+A.at(j)<N-1)
      {
        sirusi.at(j+A.at(j)+1)--;
      }
    }
    rep(j,N)
    {
      if(j==0) {hoge.at(0)=sirusi.at(0); continue;}
      hoge.at(j)=hoge.at(j-1)+sirusi.at(j);
    }
    A=hoge;
  }
  rep(i,N)
  {
    if(i!=0) {cout<<" ";}
    cout<<A.at(i);
  }
  cout<<endl;
  return 0;
}

#include <bits/stdc++.h>

#define F first 
#define S second
#define PB push_back

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;
typedef priority_queue<int> HEAP;
typedef priority_queue<int, vector<int>, greater<int> > RHEAP;

const int N = 510, M = 1010;

int a, b, n = 100;
char g[N][N];

int main()
{
	cin >> a >> b;
	a -- , b -- ;
	
	for (int i = 1; i <= n; i ++ )
		for (int j = 1; j <= n; j ++ )
			g[i][j] = i <= 50 ? '#' : '.';
	
	for (int i = 1; a && i <= n / 2 - 1; i += 2)
		for (int j = 1; a && j <= n; j += 2, a -- )
			g[i][j] = '.';
	
	for (int i = n / 2 + 2; b && i <= n; i += 2)
		for (int j = 1; b && j <= n; j += 2, b -- )
			g[i][j] = '#';
	
	puts("100 100");
	for (int i = 1; i <= n; i ++ ) puts(g[i] + 1);
    return 0;
}