#include <bits/stdc++.h>
using namespace std;
map<pair<long long, pair<long long, long long>>, long long> mp;
long long solve(long long z, long long k, long long s, long long* a,
                long long n, bool prev) {
  if (mp.find({z, {k, s}}) != mp.end()) return mp[{z, {k, s}}];
  if (z < 0) return 0;
  if (k < 0) return 0;
  if (s < 0 || s > n - 1) return 0;
  if (prev == 0) return a[s] + solve(z, k - 1, s + 1, a, n, prev);
  long long mr = a[s] + solve(z, k - 1, s + 1, a, n, prev);
  long long ml = a[s] + solve(z - 1, k - 1, s - 1, a, n, prev);
  mp[{z, {k, s}}] = max(mr, ml);
  if (max(mr, ml) == ml)
    prev = 0;
  else
    prev = 1;
  return max(mr, ml);
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k, z;
    cin >> n >> k >> z;
    long long a[n];
    for (long long u = 0; u < n; u++) {
      cin >> a[u];
    }
    cout << solve(z, k, 0, a, n, 1) << endl;
    mp.clear();
  }
}
