#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  k = min(k, m - 1);
  int notInCon = m - k - 1;
  vector<int> L(k + 2, INT_MAX);
  for (int start = 0; start <= notInCon; start++) {
    int l = start + 1, r = n - notInCon + start;
    for (int j = 0; j <= k; j++)
      L[j] = min(L[j], max(a[l + j], a[r - (k - j)]));
  }
  int res = 0;
  for (int i = 0; i <= k; i++) res = max(res, L[i]);
  cout << res << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int testCase;
  cin >> testCase;
  while (testCase--) solve();
  return 0;
}
