#include <iostream>
using namespace std;

int main() {

	int n, k, x;
	int p[n];
	cin >> n >> k >> x;
	for(int i = 0;i<n;i++){
		cin >> p[i];
	}
	int c=1;
	int aura=0;
	int j = 0;
	for(int i=0; i<n-k+1; i++){
		for(int l=j;l<k+j;l++){
			aura+=p[l]*c;
			if(c<x and p[l]<0){
				c++;
			}
		}
		j++;
		c=1;
		cout << aura << " ";
		aura = 0;
	}

	return 0;
}