#include <bits/stdc++.h>
long double eps = 1e-8;
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k, z;
    cin >> n >> k >> z;
    vector<long long> v(n + 1000);
    vector<long long> pref(n + 1000);
    for (long long i = 1; i <= n; ++i) {
      cin >> v[i];
      pref[i] = pref[i - 1];
      pref[i] += v[i];
    }
    long long res = pref[k + 1];
    long long sum = v[1];
    long long mx = 0;
    for (long long i = 2; i <= n; ++i) {
      if (!k) break;
      --k;
      sum += v[i];
      if (z * 2 <= k) {
        long long from = k - z * 2;
        mx = (v[i - 1] + v[i]) * z;
        if (i + from >= n)
          mx += pref[n] - pref[i];
        else
          mx += pref[i + from] - pref[i];
      } else {
        mx = 0;
        long long from = (k + 1) / 2, to = k / 2;
        mx = v[i - 1] * from + v[i] * to;
      }
      res = max(res, sum + mx);
    }
    cout << res << "\n";
    v.clear();
    pref.clear();
  }
  return 0;
}
