#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long MOD = 1000000009;
double eps = 1e-12;
void solve() {
  long long n, m, k, p, j, i;
  cin >> n >> m >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  k = min(k, m - 1);
  long long ans = 0;
  for (long long i = 0; i < k + 1; i++) {
    long long mn = 2e18;
    for (long long j = 0; j < m - k; j++) {
      mn = min(mn, max(a[i + j], a[n + i + j - m]));
    }
    ans = max(ans, mn);
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  for (int it = 1; it <= t; it++) {
    solve();
  }
  return 0;
}
