#include <bits/stdc++.h>
using namespace std;
int t;
long long a[4000], n, m, k, minn[4000], ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 0; i < n; i++) cin >> a[i];
    k = min(k, m - 1);
    for (int i = 0; i < m; i++) {
      minn[i] = max(a[i], a[i + n - m]);
    }
    ans = 0;
    for (int i = 0; i <= k; i++) {
      long long minnn = 582848528488LL;
      for (int j = 0; j < m - k; j++) {
        minnn = min(minnn, minn[i + j]);
      }
      ans = max(ans, minnn);
    }
    cout << ans << endl;
  }
  return 0;
}
