#include <stdio.h>

int main(void)
{

    /* 変数の宣言 */
    int n,k;
    int r_s,r_l;


    /* 2つの数値を入力 */
    scanf("%d %d", &n,&k);

    int a[n];
    int b[n];
    int c[n];
    for (int i = 0; i < n; i++){
    scanf("%d ",&a[i]);
    b[i] = a[i];
    }

    for (int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            r_s = j - b[j];
            if (r_s < 0){
                r_s = 0;
            }
            r_l = j + b[j];
            if (r_s >= n){
                r_s = n - 1;
            }
            for (int l = r_s; l < r_l; l++){
                c[l] = c[l] + 1;
            }
            b[j] = c[j];
        }
        for (int i = 0; i < n; i++){
            c[i] = 0;
        }
        
    }

    for (int i = 0; i < n; i++){
        printf("%d",c[i]);
    }

    return 0;
}