#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int N;
map<pair<pair<int, int>, pair<int, bool>>, int> mp;
int func(int i, int moves, int left, bool mov) {
  if (moves == 0) return 0;
  int maxx = 0;
  if (mp.find({{i, moves}, {left, mov}}) != mp.end())
    return mp[{{i, moves}, {left, mov}}];
  if (left > 0 && i > 0 && mov)
    maxx = vec[i - 1] + func(i - 1, moves - 1, left - 1, false);
  if (i + 1 < N)
    maxx = max(maxx, vec[i + 1] + func(i + 1, moves - 1, left, true));
  mp[{{i, moves}, {left, mov}}] = maxx;
  return maxx;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    N = n;
    vec.clear();
    mp.clear();
    vec = vector<int>(n);
    for (int i = 0; i < n; i++) cin >> vec[i];
    cout << vec[0] + func(0, m, k, true) << "\n";
  }
  return 0;
}
