#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, k, z;
    cin >> n >> k >> z;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    a.push_back(-1000000000);
    long long ans = 0;
    for (int le = 0; le <= z; ++le) {
      int tar = k - 2 * le;
      if (tar < 0) continue;
      long long su = 0, be = 0;
      for (int i = 0; i <= tar; ++i) su += a[i];
      for (int i = 0; i <= tar; ++i) be = max(be, a[i] + a[i + 1]);
      ans = max(ans, su + be * le);
    }
    cout << ans << "\n";
  }
  return 0;
}
