#include<iostream>
#include<vector>

using namespace std;

int main (){
    int n, k, x;
    cin >> n >> k >> x;
    vector <int> p(n);
    for (int i = 0; i < n; i++){
        cin >> p[i];
    }

    n = n - k + 1;
    int zbir = 0;
    int c = 1;
    for (int i = 0; i < n; i++){
        int j = i;
        int en = j + k;

        zbir = 0;
        c = 1;
        for (j; j < en; j++){
            zbir += p[j] * c;
            if (c < x) c++;
        }
        cout << zbir << " ";
    }
}