#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = 0;
  for (int x = 0; x <= min(k, m - 1); x++) {
    int tmp = 1e9 + 10;
    for (int y = 0; y < m - min(k, m - 1); y++) {
      tmp = min(tmp, max(a[x + y], a[n - (m - x - y)]));
    }
    ans = max(ans, tmp);
  }
  cout << ans << endl;
}
int main() {
  int ___T;
  scanf("%d", &___T);
  for (int cs = 1; cs <= ___T; cs++) {
    solve();
  }
  return 0;
}
