#include <bits/stdc++.h>
using namespace std;
long long getmin(long long a, long long b, vector<long long>& arr) {
  long long ans = 1000000009;
  for (long long i = a; i < b; i++) {
    ans = min(ans, arr[i]);
  }
  return ans;
}
int main(int argc, char* argv[]) {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> arr(n);
    for (long long i = 0; i < n; i++) cin >> arr[i];
    long long ekle = n - m;
    vector<long long> v;
    for (long long i = 0; i + ekle < n; i++) {
      v.push_back(max(arr[i], arr[i + ekle]));
    }
    k = min(k, m - 1);
    long long blok = m - k;
    long long ans = 0;
    for (long long i = 0; i + blok <= v.size(); i++) {
      ans = max(ans, getmin(i, i + blok, v));
    }
    cout << ans << endl;
  }
}
