#include <bits/stdc++.h>
using namespace std;
const long long M = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long ans = LLONG_MIN;
    k = min(k, m - 1);
    for (int i = 0; i <= k; i++) {
      long long tans = LLONG_MAX;
      for (int j = 0; j <= (m - 1 - k); j++) {
        long long currans = max(a[i + j], a[i + j + n - m]);
        tans = min(tans, currans);
      }
      ans = max(ans, tans);
    }
    cout << ans << "\n";
  }
  return 0;
}
