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