#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long a[N], sum[N], two[N];
int main() {
  long long t, n, k, z;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld%lld%lld", &n, &k, &z);
    memset(sum, 0, sizeof(sum));
    memset(two, 0, sizeof(two));
    for (long long i = 1; i <= n; ++i) {
      scanf("%lld", &a[i]);
      sum[i] = a[i] + sum[i - 1];
      if (i > 1) two[i] = max(two[i - 1], a[i] + a[i - 1]);
    }
    long long ans = 0;
    long long cnt = 0;
    long long tmp = k + 1 - 2 * z;
    long long t1 = 1;
    for (long long i = k + 1; i >= max(tmp, t1); i -= 2) {
      ans = max(ans, sum[i] + max(cnt * two[i], cnt * (a[i] + a[i + 1])));
      cnt++;
    }
    cout << ans << '\n';
  }
  return 0;
}
