#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, k, t, a, b, c, d, e, l, r, z;
  cin >> t;
  while (t--) {
    cin >> n >> k >> z;
    long long int arr[n + 5], cum[n + 5], consum[n + 5], mxarr[n + 5], mx = 0;
    cum[0] = 0;
    for (i = 1; i <= n; i++) {
      cin >> arr[i];
      cum[i] = (cum[i - 1] + arr[i]);
    }
    mxarr[1] = 1;
    mxarr[0] = 1;
    mx = arr[1];
    consum[0] = 0;
    consum[1] = arr[1];
    for (i = 1; i < n; i++) {
      consum[i] = arr[i] + arr[i + 1];
      if (consum[i] > mx) {
        mx = consum[i];
        mxarr[i] = i;
      } else {
        mxarr[i] = mxarr[i - 1];
      }
    }
    long long int ans = cum[k + 1], ans2 = 0, ans3, ind;
    for (i = 1; i <= z; i++) {
      ind = k - (i * 2);
      if (ind < 0) break;
      ind++;
      ans3 = cum[ind];
      ans2 = 0;
      for (j = 1; j <= ind; j++) {
        ans2 = max(ans2, consum[j]);
      }
      ans3 += (ans2 * i);
      ans = max(ans, ans3);
    }
    cout << ans << endl;
  }
  return 0;
}
