#include <bits/stdc++.h>
using namespace std;
struct str {
  long long val;
  long long pos;
};
bool compare(str a, str b) {
  if (a.val == b.val) return a.pos < b.pos;
  return a.val > b.val;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1, n, xx, x = 0, y = 0, cc, f, m, k;
  cin >> t;
  while (t--) {
    cin >> n >> k >> m;
    long long a[n + 4], pr[n + 5];
    str b[n + 5];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    pr[0] = a[0];
    for (int i = 1; i < n; i++) {
      pr[i] = pr[i - 1] + a[i];
      b[i - 1].val = a[i] + a[i - 1];
      b[i - 1].pos = i;
    }
    long long r, sum = 0, mx = -1;
    for (int i = 0; i < n - 1; i++) {
      if (b[i].pos > k) break;
      r = k - b[i].pos;
      x = min(r, 2 * m);
      sum = pr[b[i].pos];
      sum += (x / 2) * a[b[i].pos];
      sum += ((x + 1) / 2) * a[b[i].pos - 1];
      r -= x;
      sum += (pr[min(b[i].pos - (x % 2) + r, n - 1)] - pr[b[i].pos - (x % 2)]);
      mx = max(mx, sum);
      sum = 0;
    }
    cout << mx << endl;
  }
  return 0;
}
