#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 dp(long long idx, long long left, long long prev, long long moves) {
  long long ans = 1e9;
  if (moves == k) return a[idx];
  if (cache[idx][left][prev] != -1) return cache[idx][left][prev];
  ans = a[idx] + dp(idx + 1, left, 0, moves + 1);
  if (prev == 0 && left + 1 <= z) {
    ans = max(ans, a[idx] + dp(idx - 1, left + 1, 1, moves + 1));
  }
  return cache[idx][left][prev] = ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    cin >> n >> k >> z;
    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;
    for (long long i = 1; i <= n; i++) cin >> a[i];
    long long ans = dp(1, 0, 1, 0);
    cout << ans << "\n";
  }
  return 0;
}
