#include<bits/stdc++.h>
using namespace std;
int main(){
	#define int long long
	int n;
	cin>>n;
	int k, x;
	cin>>k>>x;
	int a[n];
	for(int i=0;i<n;i++) cin>>a[i];
	if(n<4000){
	int pref[n+1];
	pref[0] = 0;
	for(int i=1;i<n+1;i++) pref[i] = pref[i-1]+a[i-1];
	for(int i=0;i<n-k+1;i++){
		int r = k-1+i;
		vector<int> v;
		v.push_back(0);
		for(int j = i+1;j<=r;j++) v.push_back(pref[r+1]-pref[j]);
		sort(v.begin(), v.end());
		int tr = v.size()-1;
		int ostalo = x-1;
		int res = pref[r+1]-pref[i];
		while(ostalo){
			res+=v[tr];
			ostalo--;
			tr--;			
		}
		cout<<res<<endl;
	}
}
}