#include <bits/stdc++.h>
using namespace std;
int n, k, z;
int dp[100001][6][2], a[100001];
const int N = 2e5 + 1;
int calc(int idx, int k, int z, int left) {
  if (k == 0) return 0;
  int &res = dp[k][z][left];
  if (res != -1) return dp[k][z][left];
  if (z == 0 || left == 1) return res = a[idx] + calc(idx + 1, k - 1, z, 0);
  return res = max(a[idx] + calc(idx - 1, k - 1, z - 1, 1),
                   a[idx] + calc(idx + 1, k - 1, z, 0));
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    memset(dp, -1, sizeof(dp));
    cin >> n >> k >> z;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    cout << a[0] + calc(1, k, z, 0) << endl;
  }
  return 0;
}
