#include <bits/stdc++.h>
using namespace std;
int v[3600];
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    scanf("%d", &v[i]);
  }
  if (k >= m - 1) {
    int ret = 0;
    for (int i = 0; i < m; i++) {
      ret = max(ret, v[i]);
      ret = max(ret, v[n - 1 - i]);
    }
    cout << ret << endl;
    return;
  } else {
    int ret = INT_MIN;
    for (int i = 0; i <= k; i++) {
      int now = INT_MAX;
      for (int j = 0; j <= m - 1 - k; j++) {
        now = min(now, max(v[i + j], v[n - 1 + j - (m - 1 - k) - (k - i)]));
      }
      ret = max(ret, now);
    }
    cout << ret << endl;
    return;
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
