#include <bits/stdc++.h>
using namespace std;
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
bool codejam = 0;
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long NMAX = 1000 * 1000 + 11;
long long n, m, q, k, a, b, c;
string in, out;
char ch;
string s;
vector<long long> v;
map<long long, long long> mp;
long long arr[100011];
long long pref[NMAX], mx[NMAX];
void solve() {
  long long n, k, z;
  cin >> n >> k >> z;
  for (long long i = 0; i < n; i++) {
    pref[i] = 0;
    arr[i] = 0;
    mx[i] = 0;
  }
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    pref[i] = arr[i];
    mx[i] = arr[i];
    if (i != 0) {
      pref[i] = pref[i - 1] + arr[i];
      mx[i] = max(arr[i] + arr[i - 1], mx[i - 1]);
    }
  }
  long long ans = -1;
  for (long long lm = 0; lm <= z; lm++) {
    long long rm = k - lm;
    long long cur = rm - lm;
    if (cur < 0) continue;
    ans = max(ans, pref[cur] + lm * (mx[cur]));
    if (cur < n - 1) ans = max(ans, pref[cur] + lm * mx[cur + 1]);
  }
  cout << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  long long cs = 1;
  cin >> t;
  while (t--) {
    if (codejam) {
      cout << "Case #" << cs << ": ";
    }
    cs++;
    solve();
    cout << "\n";
  }
}
