#include <bits/stdc++.h>
using namespace std;
int a[100001] = {0};
int dp[100001] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k, z;
    cin >> n >> k >> z;
    int sum = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= n; i++) {
      dp[i] = dp[i - 1] + a[i];
    }
    int ans = 0;
    for (int i = 2; i <= k + 1; i++) {
      int currnum = i - 1;
      int rem = k - currnum;
      int cursum = dp[i];
      if (2 * z >= rem) {
        int sumrem = (rem / 2) * a[i] + (rem / 2) * a[i - 1] +
                     (rem % 2 == 1) * a[i - 1] + dp[i];
        ans = max(ans, sumrem);
      } else {
        int sumrem =
            z * a[i] + z * a[i - 1] + (dp[i + rem - 2 * z] - dp[i]) + dp[i];
        ans = max(ans, sumrem);
      }
    }
    cout << ans << endl;
  }
  return 0;
}
