#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << "\t|";
  __f(comma + 1, args...);
}
const int MOD = 1e9 + 7;
long long mod(long long a) { return (long long)(a % MOD + MOD) % MOD; }
long long mul(long long a, long long b) {
  return (long long)mod(mod(a) * mod(b));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, k, z;
    cin >> n >> k >> z;
    vector<int> a(n), pre(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    pre[0] = a[0];
    for (int i = 1; i < n; i++) pre[i] = a[i] + pre[i - 1];
    k++;
    long long ans = pre[k - 1];
    for (int i = 0; i < n - 1; i++) {
      if (i + 2 > k) break;
      long long cur = pre[i + 1];
      long long taken = i + 2;
      long long temp = ceil((k - taken) / 2.0);
      long long l_max = min(temp, z);
      cur += a[i] * l_max;
      long long rem = k - taken - l_max;
      if (rem == l_max - 1) {
        cur += a[i + 1] * (l_max - 1);
        rem = 0;
      } else if (rem >= l_max) {
        cur += a[i + 1] * l_max;
        rem -= l_max;
      }
      if (rem) cur += pre[i + rem + 1] - pre[i + 1];
      ans = max(ans, cur);
    }
    cout << ans << '\n';
  }
  return 0;
}
