#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long binpow_mod(long long a, long long b, long long c) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a % c;
    }
    a = a * a % c;
    b >>= 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long T;
  cin >> T;
  long long t = 1;
  while (T--) {
    long long n, k, z;
    cin >> n >> k >> z;
    long long a[n];
    long long i, j, l;
    long long sum = 0;
    long long ans = 0;
    long long pref[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (i == 0) {
        pref[i] = a[i];
      } else
        pref[i] = pref[i - 1] + a[i];
      if (i <= k) {
        sum += a[i];
      }
    }
    ans = max(ans, sum);
    for (long long freq = 1; freq <= z && k - 2 * freq >= 0; freq++) {
      long long c1 = pref[k - 2 * freq];
      long long c2 = pref[k - 2 * freq + 1] + freq * (a[k - 2 * freq]) +
                     (freq - 1) * (a[k - 2 * freq + 1]);
      long long mx = 0;
      for (j = 0; j + 1 <= k - 2 * freq; j++) {
        mx = max(mx, a[j] + a[j + 1]);
      }
      ans = max(ans, freq * (mx) + c1);
      ans = max(ans, c2);
    }
    cout << ans << "\n";
  }
}
