#include <bits/stdc++.h>
using namespace std;
int c[10], a[100010], s[100010], T, n, k, z;
inline int max(int x, int y) { return x > y ? x : y; }
inline int min(int x, int y) { return x < y ? x : y; }
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d %d %d", &n, &k, &z);
    for (register int i = 1; i <= n; ++i) {
      scanf("%d", &a[i]);
      s[i] = s[i - 1] + a[i];
    }
    int ans = 0, last = 0, maxs = 0;
    for (register int i = z; i >= 0; --i) {
      if (k - i * 2 + 1 <= 0) continue;
      int th = k - i * 2 + 1;
      int now = s[th];
      for (register int x = last + 1; x <= min(th, n - 1); ++x)
        maxs = max(maxs, a[x] + a[x + 1]);
      last = min(th, n - 1);
      ans = max(ans, now + maxs * i);
    }
    printf("%d\n", ans);
  }
  return 0;
}
