#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    deque<long int> q;
    int n, m, k, j = 0, k1;
    cin >> n >> m >> k;
    long int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) q.push_back(a[i]);
    k1 = n - 1;
    long int ans = 0;
    k = min(k, m - 1);
    for (int i = 0; i <= k; i++) {
      long int minn = (int)1e9;
      for (int j = 0; j <= m - 1 - k; j++) {
        long int maxx = max(a[i + j], a[i + j + n - m]);
        minn = min(maxx, minn);
      }
      ans = max(minn, ans);
    }
    cout << ans << endl;
  }
}
