#include <bits/stdc++.h>
using namespace std;
void c_p_c() {}
long long dp[100002][6];
long long fun(long long arr[], long long i, long long k, long long z,
              long long n) {
  if (i >= n || k == 0 || i < 0) return 0;
  if (dp[i][z] != -1) return dp[i][z];
  long long value = 0;
  if (i < n) value = max(value, arr[i] + fun(arr, i + 1, k - 1, z, n));
  if (i > 0 and z > 0)
    value = max(value, arr[i] + fun(arr, i - 1, k - 1, z - 1, n));
  return dp[i][z] = value;
}
void solve() {
  long long n, k, z;
  cin >> n >> k >> z;
  long long arr[n];
  memset(dp, -1, sizeof(dp));
  for (long long i = 0; i < n; i++) cin >> arr[i];
  cout << arr[0] + fun(arr, 1, k, z, n) << "\n";
}
int32_t main() {
  c_p_c();
  long long t;
  cin >> t;
  while (t--) solve();
}
