#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000;
const int INF = 1e9 + 7;
int a[MAXN], f[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(6);
  cout << fixed;
  int T;
  cin >> T;
  for (; T--;) {
    int n, m, k;
    cin >> n >> m >> k;
    --m;
    k = min(m, k);
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i <= m; i++) {
      f[i] = max(a[i + 1], a[n - (m - i)]);
    }
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int mn = INF;
      for (int j = i, tj = m - (k - i); j <= tj; j++) {
        mn = min(mn, f[j]);
      }
      ans = max(ans, mn);
    }
    cout << ans << endl;
  }
  return 0;
}
