#include<bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long p, k, a, x, t;
    cin >> p >> k >> x;
    vector<long long> v(p), s(p + 1);
    for (long long i = 0; i < p; i++){
        cin >> v[i];
    }
    s[p] = 0;
    for (long long i = p - 1; i >= 0; i--){
        s[i] = s[i + 1] + v[i];
    }
    for (long long i = 0; i < p - k + 1; i++){
        a = s[i] - s[i + k];
        vector<long long> n;
        for (long long j = i + 1; j <= i + k; j++){
            n.push_back(s[j] - s[i + k]);
        }
        sort(n.begin(), n.end());
        for (long long j = n.size() - x + 1; j < n.size(); j++){
            a += n[j];
        }
        cout << a << " ";
    }
    return 0;
}