#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long a[4000];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    k = min(k, m - 1);
    long long d, best = -1;
    for (long long x = 0; x <= k; x++) {
      long long ans1 = (1e9) + 10;
      for (long long y = 0; y <= (m - 1) - k; y++) {
        d = max(a[x + y], a[x + y + (n - m)]);
        ans1 = min(ans1, d);
      }
      best = max(best, ans1);
    }
    cout << best << endl;
  }
}
