#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
vector<long long> make(long long a[], long long n, long long k, long long x) {
  vector<long long> v;
  long long last = (x - k - 1 + n) % n;
  for (long long i = x; i <= last; i++) {
    v.push_back(a[i]);
  }
  return v;
}
void print(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long ans1 = -1;
    long long y = min(m - 1, k) + 1;
    for (long long j = 0; j < y; j++) {
      vector<long long> v = make(a, n, y - 1, j);
      long long x = v.size();
      long long pos = (m - min(m - 1, k));
      long long ans = 1e18;
      for (long long i = 0; i < m - min(m - 1, k); i++) {
        ans = min(max(v[i], v[(i - pos + x) % x]), ans);
      }
      ans1 = max(ans1, ans);
    }
    cout << ans1 << "\n";
  }
}
