#include <bits/stdc++.h>
using namespace std;
signed main(void) {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n, k, z;
    cin >> n >> k >> z;
    vector<long long int> a(n);
    for (long long int i = 0; i < n; i++) cin >> a[i];
    vector<long long int> mx(n), preffix(n);
    for (long long int i = 0; i < n; i++) {
      if (i == 0) {
        preffix[i] = a[i];
        continue;
      } else
        preffix[i] = a[i] + preffix[i - 1];
      if (i == 1)
        mx[i] = a[0] + a[1];
      else
        mx[i] = max(mx[i - 1], a[i] + a[i - 1]);
    }
    long long int ans = a[0];
    for (long long int i = 0; i <= z; i++) {
      long long int rem = k - 2 * i;
      if (rem < 0) break;
      ans = max(ans, preffix[rem] + i * mx[rem]);
    }
    for (long long int i = 1; i <= z; i++) {
      long long int rem = k - 2 * (i - 1) - 1;
      if (rem <= 0) break;
      ans = max(ans, preffix[rem] + (i - 1) * mx[rem] + a[rem - 1]);
    }
    cout << ans << endl;
  }
}
