#include <bits/stdc++.h>
using namespace std;
long long int t, n, k, z, a[100000];
void solve() {
  cin >> n >> k >> z;
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int ans = 0;
  for (long long int left = 0; left <= z; left++) {
    long long int border = k - 2 * left, sum = 0, mxLeft = 0;
    for (long long int i = 0; i <= border; i++) {
      sum += a[i];
      mxLeft = max(a[i] + a[i + 1], mxLeft);
    }
    ans = max(sum + mxLeft * left, ans);
  }
  cout << ans << "\n";
}
int main() {
  cin >> t;
  while (t--) solve();
  return 0;
}
