#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(n), b(m);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  for (int i = 0; i < m; i++) {
    b.at(i) = max(a.at(i), a.at(i + n - m));
  }
  int ans = 0, ans_max = 0;
  for (int i = 0; i < m; i++) ans_max = max(ans_max, b.at(i));
  for (int i = 0; i <= k; i++) {
    int worst = 1000000001;
    for (int j = 0; j < m - k; j++) {
      worst = min(worst, b.at(i + j));
    }
    ans = max(ans, worst);
  }
  cout << min(ans, ans_max) << endl;
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
}
