#include <bits/stdc++.h>
const int MAXN = 1e5 + 10;
int n;
int val[MAXN];
long long sum[MAXN];
long long max(long long a, long long b) { return a > b ? a : b; }
long long solve(int m, int k) {
  long long sum = val[1];
  long long a = 0;
  for (int i = 2; i <= m; i++) {
    sum += val[i];
    a = max(a, val[i - 1] + val[i]);
  }
  return sum + a * k;
}
int main() {
  int kase;
  scanf("%d", &kase);
  while (kase--) {
    int t, m;
    scanf("%d%d%d", &n, &m, &t);
    for (int i = 1; i <= n; i++) scanf("%d", &val[i]);
    long long ans = 0;
    for (int i = 0; i <= t && (i << 1) <= m; i++) {
      int x = m + 1 - (i << 1);
      ans = max(ans, solve(x, i));
      ans = max(ans, solve(x + 1, i - 1) + val[x]);
    }
    printf("%lld\n", ans);
  }
}
