#include <bits/stdc++.h>
using namespace std;
int c(int a, int b, int m, vector<int> &v) {
  int ans = INT32_MAX;
  for (int i = 0; i < m; i++) {
    ans = min(ans, max(v[i + a], v[b + i - m]));
  }
  return ans;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = 0;
  if (k >= m - 1) {
    for (int i = 0; i < m; i++) {
      ans = max(ans, max(a[i], a[i + n - m]));
    }
    cout << ans << endl;
    return;
  }
  for (int i = 0; i <= k; i++) {
    ans = max(ans, c(i, i + n - k, m - k, a));
  }
  cout << ans << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
