#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1e5 + 50;
int a[maxn];
int dp[maxn];
int c[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k, z;
    cin >> n >> k >> z;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      dp[i] = a[i] + a[i - 1];
      c[i] = c[i - 1] + a[i];
    }
    int ans = 0;
    for (int i = 1; i <= k + 1; i++) {
      ans += a[i];
    }
    for (int i = 1; i <= z; i++) {
      int o = 0;
      for (int j = 1; j <= k - (2 * i) + 1; j++) {
        o = max(o, dp[j]);
      }
      int sum = 0;
      sum += c[k - (2 * i) + 1];
      sum += (o * (i));
      int sp = 0;
      sp += c[k - (2 * (i - 1))];
      sp += (i * a[k - (2 * i) + 1]);
      sp += (i - 1) * a[k - (2 * i) + 2];
      sum = max(sum, sp);
      ans = max(ans, sum);
    }
    cout << ans << endl;
  }
}
