#include <bits/stdc++.h>
using namespace std;
string binary_to_string(long long X) {
  std::string binary_X = std::bitset<128>(X).to_string();
  return binary_X;
}
long long string_to_binary(string binary) {
  unsigned long long decimal = std::bitset<128>(binary).to_ullong();
  return decimal;
}
void solve() {
  long long N, X, Z;
  cin >> N >> X >> Z;
  long long a[N];
  a[0] = 0;
  for (long long i = 1; i <= N; i++) {
    cin >> a[i];
  }
  long long ans = -1;
  for (long long k = 0; k <= Z; k++) {
    long long r = 1 + X - 2 * k;
    if (r < 1) {
      continue;
    }
    long long tmp = -1;
    for (long long i = 1; i <= r; i++) tmp = max(tmp, (a[i] + a[i + 1]) * k);
    for (long long i = 1; i <= r; i++) tmp += a[i];
    ans = max(ans, tmp);
  }
  printf("%lld\n", ans);
}
int main() {
  long long T;
  cin >> T;
  while (T--) {
    solve();
  }
}
