#include <bits/stdc++.h>
using namespace std;
long long power(long long base, long long exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base);
    base = (base * base);
    exp /= 2;
  }
  return res;
}
long long func(long long* a, long long n, long long k, long long z, long long s,
               long long** dp) {
  if (k == -1) {
    return 0;
  }
  if (s == n) {
    return 0;
  }
  if (dp[s][z] != -1) {
    return dp[s][z];
  }
  long long option1 = -1e18;
  long long option2 = -1e18;
  option1 = func(a, n, k - 1, z, s + 1, dp) + a[s];
  if (s > 0 && z > 0) {
    option2 = func(a, n, k - 1, z - 1, s - 1, dp) + a[s];
  }
  long long ans = max(option1, option2);
  dp[s][z] = ans;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n, k, z;
    cin >> n >> k >> z;
    long long* a = new long long[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long** dp = new long long*[n + 1];
    for (long long i = 0; i <= n; i++) {
      dp[i] = new long long[z + 1];
      for (long long j = 0; j <= z; j++) {
        dp[i][j] = -1;
      }
    }
    long long ans = func(a, n, k, z, 0, dp);
    cout << ans << "\n";
    delete[] a;
  }
  return 0;
}
