#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> A(n);
    for (int i = 0; i < n; i++) {
      cin >> A[i];
    }
    k = min(k, m - 1);
    long long ans = 0;
    for (int i = 0; i <= k; i++) {
      long long cur = LLONG_MAX;
      for (int j = 0; j <= m - 1 - k; j++) {
        cur = min(cur, max(A[i + j], A[i + j + n - m]));
      }
      ans = max(ans, cur);
    }
    cout << ans << "\n";
  }
}
