#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tt;
  cin >> tt;
label:
  while (tt--) {
    long long n, k, z;
    cin >> n >> k >> z;
    vector<long long> arr(n);
    vector<long long> dp(n + 1);
    for (long long i = 0; i < n; i++) cin >> arr[i];
    for (long long i = 0; i < n; i++) dp[i + 1] = dp[i] + arr[i];
    long long answer = 0;
    for (long long i = 1; i < n; ++i) {
      long long t = k - i;
      long long val = dp[i + 1];
      for (int j = 0; j <= min((long long)t / 2, z); j++) {
        long long temp = val + j * (arr[i] + arr[i - 1]);
        if (t - (2 * j) == 1 && (z - j)) {
          temp += max(arr[i - 1], arr[i + 1]);
        } else {
          temp += (dp[i + 1 + (t - 2 * j)] - dp[i + 1]);
        }
        answer = max(temp, answer);
      }
    }
    cout << answer << "\n";
  }
}
