#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n, k, x;
    cin >> n >> k >> x;
    vector<long long> pref(n+1);
    pref[0] = 0;
    for(int i = 1; i <= n; i++){
        long long t;
        cin >> t;
        pref[i] = t+pref[i-1];
    }
    for(int i = 1; i <= n-k+1; i++){
        long long p = pref[k+i-1]-pref[i-1];
        for(int j = 1; j < k+1; j++){
            p+=pref[i+k-1]-pref[i+j-1];
        }
        cout << p << " ";
    }
    cout << "\n";
    return 0;
}