#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN];
int main() {
  int Q;
  scanf("%d", &Q);
  while (Q--) {
    int n, k, z;
    scanf("%d%d%d", &n, &k, &z);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    int ans = 0;
    for (int t = 0; t <= z; t++) {
      int pos = 1 + k - t * 2;
      if (pos < 1) continue;
      int mx = 0, sum = 0;
      for (int i = 1; i <= pos; i++) {
        if (i < n - 1) mx = max(mx, a[i] + a[i + 1]);
        sum += a[i];
      }
      ans = max(ans, sum + mx * t);
    }
    printf("%d\n", ans);
  }
  return 0;
}
