#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 (long long i = 0; i < n; ++i) {
      cin >> a[i];
    }
    m -= 1;
    k = min(k, m);
    long long ans = 0;
    for (long long i = 0; i <= k; ++i) {
      long long ans_pos = INT_MAX;
      for (long long j = 0; j <= m - k; j++) {
        ans_pos = min(ans_pos, max(a[i + j], a[i + j + (n - m - 1)]));
      }
      ans = max(ans, ans_pos);
    }
    cout << ans << endl;
  }
  return 0;
}
