#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f3f3f3f3f;
long long dx[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long dy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long N = 3505;
long long ar[N], st[4 * N];
void build(long long node, long long L, long long R) {
  if (L == R) {
    st[node] = ar[L];
    return;
  }
  long long M = (L + R) >> 1;
  build(2 * node, L, M);
  build(2 * node + 1, M + 1, R);
  st[node] = min(st[2 * node], st[2 * node + 1]);
}
long long query(long long node, long long L, long long R, long long l,
                long long r) {
  if (l > R || L > r) return inf;
  if (l <= L && r >= R) return st[node];
  long long M = (L + R) >> 1;
  return min(query(2 * node, L, M, l, r), query(2 * node + 1, M + 1, R, l, r));
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  cin >> t;
  memset(st, 0, sizeof(st));
  memset(ar, 0, sizeof(ar));
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long a[n];
    for (long long i = 0; i < n; ++i) cin >> a[i];
    k = min(k, m - 1);
    long long w = n - (m - 1);
    for (long long i = 0; i < n; ++i) ar[i] = 0;
    for (long long i = 0; i + w <= n; ++i) {
      ar[i] = max(a[i], a[i + w - 1]);
    }
    build(1, 0, n - 1);
    long long ans = 0;
    for (long long i = 0; i <= k; ++i) {
      long long r = n - 1 - (k - i);
      long long l = r - w + 1;
      long long val = query(1, 0, n - 1, i, l);
      ans = max(ans, val);
    }
    cout << ans << '\n';
  }
  return 0;
}
