#include <bits/stdc++.h>
using namespace std;
const int N = 4000;
const int INF = 0x3f3f3f3f;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  int ok[N];
  k = min(k, m - 1);
  for (int i = 0; i < n; i++) {
    cin >> ok[i];
  }
  int ans = -1;
  for (int i = 0; i <= k; i++) {
    int res = INF;
    for (int j = 0; j < m - k; j++) {
      res = min(res, max(ok[i + j], ok[i + j + n - m]));
    }
    ans = max(ans, res);
  }
  cout << ans << endl;
  return;
}
int main() {
  ios::sync_with_stdio(0);
  int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
