#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long inf = 5e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    if (k > m - 1) {
      k = m - 1;
    }
    int a[n + 1];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    vector<int> maxChoice;
    for (int left = 1; left <= m + 1; left++) {
      maxChoice.push_back(max(a[left], a[n - m + left]));
    }
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int tmp = INT_MAX;
      for (int j = i, cnt = 0; cnt < m - k and j < maxChoice.size();
           j++, cnt++) {
        tmp = min(tmp, maxChoice[j]);
      }
      ans = max(ans, tmp);
    }
    cout << ans << endl;
  }
}
