#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
long long int powf(long long int bse, long long int co) {
  long long int mul = 1;
  for (long long int i = 0; i < co; i++) {
    mul *= bse;
  }
  return mul;
}
vector<long long int> fact(200009, 0);
void init_fact() {
  fact[0] = 1;
  for (long long int i = 1; i < 200007; i++) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
  }
}
long long inv(long long a, long long b) {
  return 1 < a ? b - inv(b % a, a) * b / a : 1;
}
vector<bool> prime(10000077, true);
void init_prime() {
  prime[0] = prime[1] = false;
  for (long long int i = 2; i * i < 10000077; i++) {
    if (prime[i]) {
      for (long long int j = i; i * j < 10000077; j++) {
        prime[i * j] = false;
      }
    }
  }
}
void solve() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> v(n + 1);
  for (long long int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  if (k >= m - 1) {
    long long int var = m - 1, mx = 0;
    for (long long int i = var; i >= 0; i--) {
      long long int left = 1 + i - 1;
      long long int right = n - (var - i) + 1;
      mx = max(mx, max(v[left + 1], v[right - 1]));
    }
    cout << mx << "\n";
    return;
  }
  long long int var = k, mx = 0;
  for (long long int i = var; i >= 0; i--) {
    long long int left = 1 + i - 1;
    long long int right = n - (var - i) + 1;
    long long int var1 = m - k - 1, mn = 1000000000000000007;
    for (long long int j = var1; j >= 0; j--) {
      long long int left1 = (left + 1) + j - 1;
      long long int right1 = (right - 1) - (var1 - j) + 1;
      mn = min(mn, max(v[left1 + 1], v[right1 - 1]));
    }
    mx = max(mx, mn);
  }
  cout << mx << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
