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

int main(){
	int n,k,x;
	cin>>n>>k>>x;
	vector<int> b(n);
	for (int i=0;i<n;i++){
		cin>>b[i];
	}
	int c=1;
	vector <int> s(n-k+1);
	for (int i=0;i<n-k+1;i++) {
		s[i]=0;
		c=1;
		for (int j=i;j<k+i;j++) {
			s[i]+=b[j]*c;
			if (b[j]<0) {
				c++;
			}
		}
		cout<<s[i]<<" ";
	}
}