#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int>> gx;
vector<vector<bool>> vx(2, vector<bool>(2, false));
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
long long pow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
void solve(long long t) {
  while (t--) {
    long long i, j, k, l, m, n, flag = 0, z;
    cin >> n >> k >> z;
    long long arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    long long sum = arr[0];
    long long presum[n + 1];
    memset(presum, 0, sizeof(presum));
    presum[0] = arr[0];
    for (i = 1; i < n; i++) presum[i] += presum[i - 1] + arr[i];
    long long ans = arr[0];
    if (k == 0) {
      cout << arr[0] << "\n";
      continue;
    }
    for (i = 1; i < n; i++) {
      long long rem_moves = k - i;
      if (rem_moves < 0) break;
      long long temp = 0;
      if (rem_moves & 1) {
        if ((rem_moves + 1) / 2 <= z)
          temp += ((rem_moves + 1) / 2) * arr[i - 1] + (rem_moves / 2) * arr[i];
        else
          temp += z * arr[i - 1] + z * arr[i] + presum[i + k - i - (z * 2)] -
                  presum[i];
      } else if (rem_moves != 0) {
        if ((rem_moves) / 2 <= z)
          temp += (rem_moves / 2) * arr[i - 1] + (rem_moves / 2) * arr[i];
        else
          temp += z * arr[i - 1] + z * arr[i] + presum[i + k - i - (z * 2)] -
                  presum[i];
      }
      ans = max(ans, temp + presum[i]);
      if (rem_moves == 0) break;
    }
    cout << ans << "\n";
  }
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  solve(t);
  return 0;
}
