#include <bits/stdc++.h>
using namespace std;
int inf = 0x3f3f3f3f;
const int N = 1e5 + 7;
int p[N][10];
int f[N];
void solve(int k, int z) {
  memset(p, 0, sizeof(p));
  p[0][0] = f[0];
  for (int i = 0; i < k; i++) {
    for (int j = 0; j <= z; j++) {
      if (i - 2 * j < 0) break;
      p[i + 1][j] = max(p[i + 1][j], p[i][j] + f[i - 2 * j + 1]);
      if (j < z && i - 2 <= k)
        p[i + 2][j + 1] =
            max(p[i + 2][j + 1], p[i][j] + f[i - 2 * j] + f[i - 2 * j + 1]);
    }
  }
  int max1 = 0;
  for (int i = 0; i <= z; i++) max1 = max(max1, p[k][i]);
  cout << max1 << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, z, k;
    cin >> n >> k >> z;
    for (int i = 0; i < n; i++) cin >> f[i];
    z = min(5, z);
    solve(k, z);
  }
  return 0;
}
