#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long power(unsigned long long a, unsigned long long b,
                unsigned long long ret = 1LL) {
  while (b--) ret = (ret * a);
  return ret;
}
int maxSize = 200000;
vector<long long> sTree(4 * maxSize);
vector<long long> lazyPro(4 * maxSize, 0);
vector<int> elements(maxSize);
void build(int index, int l, int r) {
  if (r == l) {
    sTree[index] = elements[l];
    return;
  }
  int mid = (l + r) / 2;
  build(index * 2, l, mid);
  build(index * 2 + 1, mid + 1, r);
  sTree[index] = min(sTree[index * 2], sTree[index * 2 + 1]);
}
void updateRange(int index, int l, int r, int tl, int tr, int value) {
  if (l >= tl && r <= tr) {
    lazyPro[index] += value;
    sTree[index] += value;
    return;
  }
  if (l > tl || r < tr) return;
  int mid = (l + r) / 2;
  sTree[index * 2] += lazyPro[index];
  sTree[index * 2 + 1] += lazyPro[index];
  lazyPro[index * 2] += lazyPro[index];
  lazyPro[index * 2 + 1] += lazyPro[index];
  lazyPro[index] = 0;
  updateRange(index * 2, l, mid, tl, tr, value);
  updateRange(index * 2 + 1, mid + 1, r, tl, tr, value);
  sTree[index] = min(sTree[index * 2], sTree[index * 2 + 1]);
}
long long query(int index, int l, int r, int tl, int tr) {
  if (l >= tl && r <= tr) {
    return sTree[index];
  }
  if (l > tl || r < tr) return 0;
  int mid = (l + r) / 2;
  sTree[index * 2] += lazyPro[index];
  sTree[index * 2 + 1] += lazyPro[index];
  lazyPro[index * 2] += lazyPro[index];
  lazyPro[index * 2 + 1] += lazyPro[index];
  lazyPro[index] = 0;
  return min(query(index * 2, l, mid, tl, tr),
             query(index * 2 + 1, mid + 1, r, tl, tr));
}
int scores[100000 + 9];
int n, m, z;
int dp[100000 + 5][5 + 2][2];
long long isGood(int curIndex, int rightMoves, int leftMoves, int consLeft) {
  if (leftMoves + rightMoves == m) return 0;
  if (dp[rightMoves][leftMoves][consLeft] != -1)
    return dp[rightMoves][leftMoves][consLeft];
  long long s = 0;
  if (curIndex < n - 1) {
    s = max(isGood(curIndex + 1, rightMoves + 1, leftMoves, 0) +
                scores[curIndex + 1],
            s);
  }
  if (curIndex > 0 && consLeft == 0 && leftMoves < z) {
    s = max(isGood(curIndex - 1, rightMoves, leftMoves + 1, 1) +
                scores[curIndex - 1],
            s);
  }
  return dp[rightMoves][leftMoves][consLeft] = s;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> m >> z;
    for (int i = 0; i <= n; i++) {
      for (int i2 = 0; i2 < 7; i2++) {
        for (int i3 = 0; i3 < 2; i3++) {
          dp[i][i2][i3] = -1;
        }
      }
    }
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      scores[i] = a;
    }
    cout << scores[0] + isGood(0, 0, 0, 0) << endl;
  }
}
