#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
char dir[] = {'R', 'L', 'D', 'U'};
const int MOD = 1e9 + 7;
const long long INF = 1e9;
void setIO(string filename) {
  if (fopen((filename + ".in").c_str(), "r")) {
    freopen((filename + ".in").c_str(), "r", stdin);
    freopen((filename + ".out").c_str(), "w", stdout);
  }
}
template <class T>
void printvec(vector<T> a) {
  for (T i : a) cout << i << " ";
  cout << "\n";
}
bool cmp() { return 0; }
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(n);
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cin >> a[i];
  int before = m - 1, behind = n - m;
  k = min(k, before);
  int ans = 0;
  for (__typeof(k + 1) x = (0) - ((0) > (k + 1));
       x != (k + 1) - ((0) > (k + 1)); x += 1 - 2 * ((0) > (k + 1))) {
    int curr = 1e9 + 7;
    for (__typeof(before - k + 1) y = (0) - ((0) > (before - k + 1));
         y != (before - k + 1) - ((0) > (before - k + 1));
         y += 1 - 2 * ((0) > (before - k + 1))) {
      curr = min(curr, max(a[x + y], a[x + y + behind]));
    }
    ans = max(ans, curr);
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t-- > 0) solve();
}
