#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k, z;
  cin >> n >> k >> z;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  int ans = 0;
  for (int t = 0; t <= z && k - 2 * t >= 0; ++t) {
    int d = k - 2 * t + 1;
    int val = 0;
    int cycle = 0;
    for (int i = 0; i < d; ++i) {
      val += a[i];
      if (i < n - 1) cycle = max(cycle, a[i] + a[i + 1]);
    }
    val += (cycle * t);
    ans = max(ans, val);
  }
  cout << ans << endl;
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) solve();
}
