#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, k, z;
    cin >> n >> k >> z;
    int a[n + 1];
    long long int c[k + 1][z + 1][2];
    for (int i = 1; i < n + 1; ++i) {
      cin >> a[i];
    }
    for (int i = 0; i < k + 1; ++i) {
      for (int j = 0; j < z + 1; ++j) {
        if (i == 0) {
          int pos = k - i - (z - j) * 2;
          if (pos > -1) {
            c[i][j][0] = a[pos + 1];
            c[i][j][1] = a[pos + 1];
          } else
            c[i][j][0] = 0, c[i][j][1] = 0;
        } else
          c[i][j][0] = 0, c[i][j][1] = 0;
      }
    }
    int sum = 0;
    for (int i = 1; i < k + 1; ++i) {
      for (int j = 0; j < z + 1; ++j) {
        int pos = k - i - (z - j) * 2;
        if (pos > -1) {
          if (j != 0) {
            c[i][j][0] = max(c[i - 1][j - 1][1] + a[pos + 1],
                             c[i - 1][j][0] + a[pos + 1]);
            c[i][j][1] = c[i - 1][j][0] + a[pos + 1];
          } else {
            c[i][j][0] = c[i - 1][j][0] + a[pos + 1];
            c[i][j][1] = c[i - 1][j][0] + a[pos + 1];
          }
        }
      }
    }
    cout << c[k][z][1] << "\n";
  }
}
