#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
const long long mod = 998244353;
int n, m, k;
int a[3504];
void solve() {
  cin >> n >> m >> k;
  k = min(k, m - 1);
  for (int i = (int)0; i != (int)n; i = i + 1) cin >> a[i];
  ;
  int i = 0, j = n - 1;
  int ind = -1, mx = -1;
  int rn = n - m;
  deque<int> q;
  int ans = 0;
  for (int i = (int)0; i != (int)m - k; i = i + 1) {
    int val = max(a[i], a[i + rn]);
    while (!q.empty() && q.back() > val) {
      q.pop_back();
    }
    q.push_back(val);
  }
  ans = q.front();
  for (int i = (int)0; i != (int)k; i = i + 1) {
    int valo = max(a[i], a[i + rn]);
    int vali = max(a[i + m - k], a[i + rn + m - k]);
    if (q.front() == valo) {
      q.pop_front();
    }
    while (!q.empty() && q.back() > vali) {
      q.pop_back();
    }
    q.push_back(vali);
    ans = max(ans, q.front());
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
