#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int arr[maxn];
int dp[maxn][6];
int main() {
  ios::sync_with_stdio(false);
  int kase = 0;
  int T;
  cin >> T;
  while (T--) {
    memset(dp, 0, sizeof(dp));
    int n, k, z;
    cin >> n >> k >> z;
    for (int i = 1; i <= n; i++) cin >> arr[i];
    int maxx = 0;
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      dp[i][0] = dp[i - 1][0] + arr[i];
      ans = max(ans, dp[k + 1][0]);
      if (i >= 2) {
        maxx = max(maxx, arr[i] + arr[i - 1]);
        for (int j = 1; j <= z; j++) {
          dp[i][j] = dp[i][0] + j * maxx;
          if (i + 2 * j - 1 == k) ans = max(ans, dp[i][j]);
          if (i + 2 * j - 2 == k) ans = max(ans, dp[i][j] - arr[i]);
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
