#include<bits/stdc++.h>
using namespace std;
int n, k, x, c, z, pos, maxx = 0;
int p[200000];
int pd[200000];
int main(){
    cin >> n >> k >> x;
    for(int i = 1; i <= n; i++) cin >> p[i];
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= k; j++){
            pos = i + j - 1;
            z += p[pos];
            pd[pos] = z;
        }
        cout << pd[i + k - 1];
    }

    return 0;
}