#include <bits/stdc++.h>
using namespace std;
long long pre[100001];
map<tuple<long long, long long, long long, bool>, long long> dp;
long long rec(long long arr[], long long i, long long n, long long k,
              long long z, bool flag) {
  if (k <= 0) return 0;
  if (i < 0 || i >= n) return 0;
  tuple<long long, long long, long long, bool> tup = make_tuple(i, k, z, flag);
  if (dp.count(tup)) return dp[tup];
  if (z == 0) {
    if (k >= n - i - 1)
      return pre[n - 1] - pre[i];
    else
      return pre[i + k] - pre[i];
  }
  long long rm = 0, lm = 0;
  if (i == 0) {
    rm = arr[i + 1] + rec(arr, i + 1, n, k - 1, z, true);
  } else if (i == n - 1 && z <= 0)
    return 0;
  else if (i == n - 1 && z > 0 && flag == true)
    lm = arr[i - 1] + rec(arr, i - 1, n, k - 1, z - 1, !flag);
  else if (i == n - 1 && z > 0 && flag == false)
    return 0;
  else {
    rm = arr[i + 1] + rec(arr, i + 1, n, k - 1, z, true);
    flag = true;
    if (flag == true && z > 0)
      lm = arr[i - 1] + rec(arr, i - 1, n, k - 1, z - 1, !flag);
  }
  return dp[tup] = max(rm, lm);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long te;
  cin >> te;
  while (te--) {
    long long n, k, z;
    cin >> n >> k >> z;
    dp.clear();
    long long arr[n];
    for (long long i = 0; i < n; ++i) {
      cin >> arr[i];
    }
    pre[0] = arr[0];
    for (long long i = 1; i < n; ++i) {
      pre[i] = pre[i - 1] + arr[i];
    }
    bool flag = true;
    if (z == 0) flag = false;
    cout << arr[0] + rec(arr, 0, n, k, z, flag) << "\n";
  }
  return 0;
}
