#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long test;
  cin >> test;
  while (test--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long ans = 0;
    vector<long long> v(n);
    for (long long i = 0; i < n; i++) cin >> v[i];
    k = min(m - 1, k);
    for (long long i = 0; i <= k; i++) {
      long long cur = INT_MAX;
      for (long long j = 0; j <= m - k - 1; j++) {
        long long anss = max(v[i + j], v[n - m + i + j]);
        cur = min(cur, anss);
      }
      ans = max(ans, cur);
    }
    cout << ans << '\n';
  }
}
