#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC optimization("O3")
using namespace std;
const unsigned long long mod = 998244353;
const long long inf = ((1ll << 31ll) - 1ll);
const long double pi = acos(-1);
const long long MAXN = 10000;
vector<long long> Criba(MAXN + 1);
void iniciar_criba() {
  for (long long i = 2; i <= MAXN; i += 2) Criba[i] = 2;
  for (long long i = 3; i <= MAXN; i += 2) {
    if (!Criba[i]) {
      Criba[i] = i;
      for (long long j = i * i; j <= MAXN; j += (2 * i))
        if (!Criba[j]) Criba[j] = i;
    }
  }
}
bool isprime(long long tupac) { return (Criba[tupac] == tupac); }
long long GCD(long long q, long long r) {
  if (r == 0) return q;
  return GCD(r, q % r);
}
long long LCM(long long q, long long r) { return q * (r / GCD(q, r)); }
long long qpow(long long b, long long e) {
  if (!e) return 1;
  if (e & 1) return qpow(b, e - 1) * b % mod;
  long long pwur = qpow(b, e >> 1);
  return pwur * pwur % mod;
}
long long t, n, m, k, C[200007], lB, rB;
long long A[3507];
long long sum;
bool Flag[100009];
vector<pair<long long, long long> > z;
void problem() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> A[i];
  }
  long long Max = 0;
  if (m > k + 1) {
    for (long long i = 0; i <= k; i++) {
      long long Min = 1000000007;
      for (long long j = 0; j <= m - k - 1; j++) {
        if (Min > max(A[i + j + 1], A[n - (k - i) - (m - k - 1 - j)]))
          Min = max(A[i + j + 1], A[n - (k - i) - (m - k - 1 - j)]);
      }
      if (Max < Min) Max = Min;
    }
  } else {
    k = m - 1;
    for (long long i = 0; i <= k; i++) {
      if (Max < max(A[i + 1], A[n - (k - i)]))
        Max = max(A[i + 1], A[n - (k - i)]);
    }
  }
  cout << Max;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(0);
  srand(time(NULL));
  cin >> t;
  while (t--) {
    problem();
    cout << '\n';
  }
  return 0;
}
