#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
char myHeap[200 * 1024 * 1024];
long long sz = 0;
void assert_tle(bool q) {
  while (!q)
    ;
}
void *operator new(std::size_t count) {
  sz += count;
  assert_tle(sz <= 200 * 1024 * 1024);
  return myHeap + sz - count;
}
void operator delete(void *ptr) {}
void fastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long ar[n];
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
  }
  if (m <= k) {
    long long ans = -1e18;
    for (long long i = 0; i < m; i++) {
      long long a = max(ar[i], ar[n - i - 1]);
      ans = max(ans, a);
    }
    cout << ans;
    return;
  }
  long long ans = -1e18;
  for (long long i = 0; i <= k; i++) {
    long long val = 1e18;
    long long r = m - k - 1;
    for (long long j = i; j < m - k + i; j++) {
      long long t = max(ar[j], ar[n - (m - j)]);
      val = min(val, t);
    }
    ans = max(ans, val);
  }
  cout << ans;
}
int32_t main() {
  fastIO();
  long long t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
