#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  x = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  x *= f;
}
const int N = 1e5 + 10;
int n, k, z;
long long a[N], sm[N], dp[N];
int main() {
  int T;
  read(T);
  while (T--) {
    read(n);
    read(k);
    read(z);
    for (int i = 1; i <= n; ++i) {
      read(a[i]);
      sm[i] = sm[i - 1] + (long long)a[i];
    }
    long long s = 0;
    for (int i = 1; i <= k; ++i) s += (long long)a[i];
    long long ans = 0;
    for (int i = 1; i <= k; ++i) {
      if (k - i >= z * 2)
        chkmax(ans, s + (a[i] + a[i + 1]) * z - (s - sm[k + 1 - z * 2]));
      else
        chkmax(ans, s + (a[i] + a[i + 1]) * ((k - i) / 2) +
                        a[i] * ((k - i) & 1) - (s - sm[i + 1]));
    }
    printf("%lld\n", ans);
  }
  return 0;
}
