#include <iostream>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	int n, k, x;
	cin >> n >> k >> x;
	int a = 0;
	int c = 1;
	int niz[n];
	for(int i = 1; i <= n; i++) {
		cin >> niz[i];
	}
	int b[k];
	int rez[n - k + 1];
	int l = 0;
	for(int i = 1; i <= n; i++) {
		for(int j = i; j <= k; j++) {
			b[j] = niz[j];
			if(b[j] >= 0) {
				a += b[j] * c;
				c = c + l;
				l++;
			} else {
				a += b[j] * c;
				c++;
			}
		}
		rez[i] = a;
		a = 0;
	}
	
	
	for(int i = 1; i <= k; i++) {
		cout << rez[i] << " ";
	}
	
	return 0;
}