#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e12;
const long long N = 200005;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[n];
  for (long long c = 0; c < n; c++) {
    cin >> a[c];
  }
  if (k >= m - 1) {
    long long m1 = *(max_element(a, a + m));
    long long m2 = *(max_element(a + n - m, a + n));
    cout << (max(m1, m2)) << "\n";
    return;
  } else {
    vector<long long> v;
    for (long long c = 0; c < k + 1; c++) {
      vector<long long> v1;
      for (long long d = 0; d < m - k; d++) {
        long long m1 = max(a[c + d], a[n - m + c + d]);
        v1.push_back(m1);
      }
      v.push_back(*(min_element(v1.begin(), v1.end())));
    }
    cout << (*(max_element(v.begin(), v.end()))) << "\n";
    return;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
