#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    int arr[n];
    int i, j;
    for (i = 0; i < n; i++) cin >> arr[i];
    int range = n - (m - 1);
    int l = 0, r = range - 1;
    vector<int> mini;
    while (r < n) {
      mini.push_back(max(arr[l], arr[r]));
      l++;
      r++;
    }
    int len = mini.size();
    int mind = max(1, len - k);
    l = 0, r = 0;
    int ans;
    multiset<int> now;
    while (r < mind) {
      now.insert(mini[r]);
      r++;
    }
    ans = *(now.begin());
    while (r < mini.size()) {
      now.erase(now.find(mini[l]));
      l++;
      now.insert(mini[r]);
      r++;
      ans = max(ans, *(now.begin()));
    }
    cout << ans << endl;
  }
}
