#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, k, z;
long long a[N];
long long cache[N][6][2];
long long recur(long long idx, long long left, long long prev,
                long long moves) {
  if (moves == k) return a[idx];
  auto &ans = cache[idx][left][prev];
  if (ans != -1) return ans;
  ans = a[idx] + recur(idx + 1, left, 0, moves + 1);
  if (prev == 0 && left + 1 <= z)
    ans = max(ans, a[idx] + recur(idx - 1, left + 1, 1, moves + 1));
  return ans;
}
void init() {
  for (long long i = 0; i <= n; i++) {
    for (long long j = 0; j <= 5; j++) {
      for (long long k = 0; k <= 1; k++) {
        cache[i][j][k] = -1;
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long tc;
  cin >> tc;
  while (tc--) {
    cin >> n >> k >> z;
    init();
    for (long long i = 1; i <= n; i++) cin >> a[i];
    long long ans = recur(1, 0, 1, 0);
    cout << ans << endl;
  }
}
