#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
#pragma GCC target("avx2,fma")
using namespace std;
const int INF = ~(1 << 31);
const double EPS = 1e-9;
const double pi = acos(-1);
template <class T>
T smod(T a, T b) {
  return (a % b + b) % b;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(n);
  for (__typeof(0) i = (0); i < (n); ++i) cin >> a[i];
  m--;
  k = min(k, m);
  int bst = 0;
  for (__typeof(0) i = (0); i < (k + 1); ++i) {
    int x = INF;
    for (__typeof(0) j = (0); j < (m - k + 1); ++j) {
      x = min(x, max(a[i + j], a[i + j + (n - m - 1)]));
    }
    bst = max(bst, x);
  }
  cout << bst << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
