#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,n) for(int i=0;i<(n);++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=(b);--i)
#define PB push_back
typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

// const ll INF = 0x3f3f3f3f3f3f3f3fLL;
const int INF = 0x3f3f3f3f;
const int mxN = 1e5+1;
ll t, n, k, z, a[mxN], s[mxN];

int main() {
	ios::sync_with_stdio(false);
	cin>>t;
	s[0]=0;
	while(t--){
		cin>>n>>k>>z;
		REP(i, n){
			cin>>a[i+1];
			s[i+1]=s[i]+a[i+1];
		}
		ll mx=s[k+1];
		FOR(i, 2, k){
			ll cur=s[i], r=k-i+1;		//r=moves remaining, took i-1 moves to reach i
	
			int c=min(z, r/2);			//maximum number of left moves we can make
			FOR(j, 0, c){
				cur+=(a[i]+a[i-1])*j;
				r-=2*j;
				mx=max(mx, cur+(s[i+r]-s[i]));
				if(z-j){
					mx=max(mx, cur+(s[i+r-1]-s[i])+a[i+r-2]);
				}
				r+=2*j;
				cur-=(a[i]+a[i-1])*j;
			}
			if(r-2*c && z-c){			//we might be able to make one last left move
				mx=max(mx, cur+a[i-1]);
			}
		}
		cout<<mx<<'\n';
	}
	return 0;
}