#include <iostream>
using namespace std;

int main()
{
    int n, q, x;
    
    cin >> n;
    cin >> q;
    cin >> x;
    
    int s, c;
    
    int a[n];
    for (int i = 0; i < n; i++){
        cin >> a[i];
    }
    
    int ol[n - q + 1];
    
    for(int i = 0; i < n - q + 1; i++){
        c = 2;
        s = a[i];
        for (int j = i + 1; j < i + q; j++){
            s = s + c*a[j];
            if (c < x){
                c++;
            }
        }
        ol[i] = s;
    }
    
    for(int i = 0; i < n - q + 1; i++){
        cout << ol[i] << endl;
    }
    
    return 0;
}