#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k, z;
    cin >> n >> k >> z;
    vector<int> a(n);
    for (auto& x : a) cin >> x;
    vector<int> ps(n);
    ps[0] = a[0];
    for (int i = 1; i < n; ++i) ps[i] = ps[i - 1] + a[i];
    vector<int> bps(n, 0);
    bps[0] = a[0] + a[1];
    for (int i = 1; i < n - 1; ++i) {
      bps[i] = max(bps[i - 1], a[i] + a[i + 1]);
    }
    int ans = ps[k];
    for (int i = 1; i <= z && (k - i * 2) >= 0; ++i) {
      int pos = k - i * 2;
      int option = ps[pos] + i * bps[pos];
      ans = max(ans, option);
    }
    cout << ans << "\n";
  }
  return 0;
}
