#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e9;
const int N = (int)1e5 + 2;
int dp[N][6][2], arr[N];
int n, k, z;
int solve(int i, int left, int allowed) {
  if (i + left * 2 > k + 1) return 0;
  int& ret = dp[i][left][allowed];
  if (~ret) return ret;
  ret = arr[i] + solve(i + 1, left, 1);
  if (allowed && left < z && i > 1) {
    ret = max(ret, arr[i] + solve(i - 1, left + 1, 0));
  }
  return ret;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    scanf("%d%d%d", &n, &k, &z);
    for (int i = 1; i <= n; ++i) scanf("%d", &arr[i]);
    for (int i = 1; i <= n; ++i)
      for (int j = 0; j < 6; ++j)
        for (int k = 0; k < 2; ++k) dp[i][j][k] = -1;
    printf("%d\n", solve(1, 0, 1));
  }
}
