#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1);
long long power(long long a, long long b) {
  long long p_res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      p_res *= a;
      b--;
    }
    a *= a;
    b /= 2;
  }
  return p_res;
}
long long gcd(long long a, long long b) {
  long long tmp;
  while (b != 0) {
    tmp = a;
    a = b;
    b = tmp % b;
  }
  return a;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> vec(n + 1);
  for (int i = 1; i <= n; i++) cin >> vec[i];
  int how = min(m - 1, k);
  int ans = -1;
  for (int x = 0; x <= how; x++) {
    int cand = INT_MAX;
    for (int y = 0; y + how <= m - 1; y++) {
      int l = x + y + 1;
      int r = n - (how - x) - (m - 1 - how - y);
      cand = min(cand, max(vec[l], vec[r]));
    }
    ans = max(ans, cand);
  }
  cout << ans << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    solve();
  }
}
