#include <bits/stdc++.h>
using namespace std;
void test_case() {
  long long n, k, Z;
  cin >> n >> k >> Z;
  vector<long long> a(n), pref(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  pref[0] = a[0];
  for (long long i = 1; i < n; i++) pref[i] = pref[i - 1] + a[i];
  long long ans = 0;
  for (long long i = 1; i <= min(k, n - 1); i++) {
    long long temp = pref[i];
    long long z = Z;
    long long mvs = k - i;
    long long zigzag = min(mvs / 2, z);
    temp += (a[i] + a[i - 1]) * zigzag;
    mvs -= 2 * zigzag;
    z -= zigzag;
    long long pos = i;
    if (z > 0 && mvs > 0) {
      z--;
      mvs--;
      temp += a[i - 1];
      pos--;
    }
    if (mvs > 0) {
      temp += pref[pos + mvs] - pref[pos];
    }
    ans = max(ans, temp);
  }
  cout << ans << endl;
}
signed main() {
  long long t = 1;
  cin >> t;
  while (t--) test_case();
  return 0;
}
