#include <bits/stdc++.h>
using namespace std;
vector<long long> vec;
vector<map<vector<long long>, long long> > dpmp;
long long n;
long long foo(long long ind, long long stepsleft, long long ztemp,
              long long laststep) {
  if (stepsleft == 0) {
    return 0;
  }
  vector<long long> v = {stepsleft, ztemp, laststep};
  if (dpmp[ind].find(v) != dpmp[ind].end()) {
    return dpmp[ind][v];
  }
  long long ans = 0;
  if (ind + 1 < n)
    ans = max(ans, foo(ind + 1, stepsleft - 1, ztemp, 1) + vec[ind + 1]);
  if (ind - 1 >= 0 && ztemp - 1 >= 0 && laststep == 1)
    ans = max(ans, foo(ind - 1, stepsleft - 1, ztemp - 1, 0) + vec[ind - 1]);
  dpmp[ind][v] = ans;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    vec.clear();
    dpmp.clear();
    long long k, z;
    cin >> n >> k >> z;
    for (long long i = 0; i < n; ++i) {
      long long a;
      cin >> a;
      vec.push_back(a);
    }
    dpmp.resize(n);
    cout << vec[0] + foo(0, k, z, 1);
    cout << endl;
  }
  return 0;
}
