#include <bits/stdc++.h>

using namespace std;

int main() {

	int n, k, x; cin >> n >> k >> x;
	int niz[n];
	for (int i = 0; i<n; i++) cin >> niz[i];
	for (int l = 0; l<n-k+1; l++) {
		int d = l+k-1;
		int c[k];
		for (int i = 0; i<k; i++) c[i] = 1;
		for (int brojac = 0, i = d-1; brojac<x, i>=l; i--) {
			if(niz[i] < 0) {
				brojac++;
				for (int j = i-l+1; j<k; j++) c[j]++;
			}
		}
		int aura = 0;
		for (int i = 0; i<k; i++) {
			//cout /*<< niz[i+l] << '*'*/ << c[i] << ' ';
			aura+=niz[i+l]*c[i];
		}
		cout << aura << ' ';
	}	

return 0;
}