#include <bits/stdc++.h>
using namespace std;
void Yes() { printf("Yes\n"); }
void No() { printf("No\n"); }
const long long mod = 1e9 + 7;
template <typename T>
T gcf(T a, T b) {
  return (b == 0) ? a : gcf(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return (a * b) / gcf(a, b);
}
template <typename T>
T sumTo(T x) {
  return x * (x + 1) / 2;
}
template <typename T>
T sumSquaresTo(T x) {
  return x * (x + 1) * (2 * x + 1) / 6;
}
template <typename T>
T ceilDiv(T n, T d) {
  return (n + d - 1) / d;
}
int n, k, z;
vector<int> a;
bool computed[100005][6][2];
int dp[100005][6][2];
int f(int i, int ml, int cml, int tm) {
  if (tm == k) return 0;
  if (computed[i][ml][cml]) return dp[i][ml][cml];
  int next = a[i + 1] + f(i + 1, ml, (ml < z) ? 1 : 0, tm + 1);
  computed[i + 1][ml][(ml < z) ? 1 : 0] = 1;
  dp[i + 1][ml][(ml < z) ? 1 : 0] = next - a[i + 1];
  if (!cml) {
    return next;
  } else {
    int prev = a[i - 1] + f(i - 1, ml + 1, 0, tm + 1);
    computed[i - 1][ml + 1][0] = 1;
    dp[i - 1][ml + 1][0] = prev - a[i - 1];
    return max(next, prev);
  }
}
void solve() {
  cin >> n >> k >> z;
  a.clear();
  for (int i = 0; i < n + 2; i++)
    for (int j = 0; j < 6; j++)
      for (int el = 0; el < 2; el++) computed[i][j][el] = 0;
  for (int i = 0; i < n; i++) {
    int ai;
    cin >> ai;
    a.push_back(ai);
  }
  printf("%d\n", a[0] + f(0, 0, 0, 0));
}
int main() {
  int t = 1;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
