#include <bits/stdc++.h>
using namespace std;
const int P = 998244353;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 5;
int n, m, k;
int a[N];
void init() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  k = min(k, m - 1);
  int left = m - k;
  int ans = 0;
  for (int i = 0; i <= k; i++) {
    int res = INF;
    for (int j = i + 1; j < i + 1 + left; j++) {
      res = min(res, max(a[j], a[j + n - m]));
    }
    ans = max(ans, res);
  }
  cout << ans << endl;
}
int main() {
  int T;
  cin >> T;
  for (int i = 1; i <= T; i++) init();
  return 0;
}
