#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long mod(long long x) { return ((x % M + M) % M); }
long long add(long long a, long long b) { return mod(mod(a) + mod(b)); }
long long n, k, z;
long long dp[100002][6];
long long ok(vector<long long>& a, int i, int kk, int zz) {
  if (kk == 0 || i >= n || i < 0) return 0;
  if (dp[i][zz] != -1) return dp[i][zz];
  long long val = 0;
  if (i < n) val = max(val, a[i] + ok(a, i + 1, kk - 1, zz));
  if (i >= 0 && zz > 0) val = max(val, a[i] + ok(a, i - 1, kk - 1, zz - 1));
  return dp[i][zz] = val;
}
void solve() {
  cin >> n >> k >> z;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  memset(dp, -1, sizeof(dp));
  long long x = ok(a, 1, k, z) + a[0];
  cout << x << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  int t = 1;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
