#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long inf = 1e18;
const int MxN = 100001;
int n, k, z;
vector<long long> a(MxN);
long long dp[MxN][6][2];
long long rec(int idx, int lefts, int prev, int moves) {
  if (moves == k) return a[idx];
  if (idx > n || idx < 0) return -1e9;
  long long& ans = dp[idx][lefts][prev];
  if (ans != -1) return ans;
  ans = a[idx] + rec(idx + 1, lefts, 0, moves + 1);
  if (prev == 0 && lefts + 1 <= z)
    ans = max(ans, a[idx] + rec(idx - 1, lefts + 1, 1, moves + 1));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> k >> z;
    for (int i = 0; i < n; ++i) cin >> a[i];
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < 6; ++j)
        for (int k = 0; k < 2; ++k) dp[i][j][k] = -1;
    cout << rec(0, 0, 1, 0) << "\n";
  }
  return 0;
}
