#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long power(long long a, long long b, long long p) {
  if (a == 0) return 0;
  long long res = 1;
  a %= p;
  while (b > 0) {
    if (b & 1) res = (res * a) % p;
    b >>= 1;
    a = (a * a) % p;
  }
  return res;
}
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long nbTests;
  cin >> nbTests;
  while (nbTests--) {
    long long nbElem, pos, nbControl;
    cin >> nbElem >> pos >> nbControl;
    long long before = pos - 1, behind = nbElem - pos;
    nbControl = min(nbControl, before);
    vector<long long> tab(nbElem);
    for (long long i = 0; i < nbElem; ++i) cin >> tab[i];
    long long bestStrategy = 0;
    for (long long orderFirst = 0; orderFirst <= nbControl; ++orderFirst) {
      long long strategyAns = (long long)(1e9) + 5;
      for (long long opponentFirst = 0; opponentFirst <= before - nbControl;
           ++opponentFirst) {
        long long caseAns = max(tab[orderFirst + opponentFirst],
                                tab[orderFirst + opponentFirst + behind]);
        strategyAns = min(strategyAns, caseAns);
      }
      bestStrategy = max(bestStrategy, strategyAns);
    }
    cout << bestStrategy << "\n";
  }
}
