#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k, m, mx = 0;
  cin >> n >> m >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  k = min(k, m - 1);
  for (long long i = 0; i <= k; i++) {
    long long mn = int(1e9) + 5;
    for (long long j = 0; j < m - k; j++) {
      mn = min(mn, max(a[i + j], a[i + j + n - m]));
    }
    mx = max(mx, mn);
  }
  cout << mx << endl;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  long long ti;
  cin >> ti;
  while (ti--) solve();
  return 0;
}
