#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
long long a[3501];
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k, ma = 0;
    cin >> n >> m >> k;
    for (long long i = 0; i < (long long)(n); ++i) cin >> a[i];
    k = min(k, m - 1);
    for (long long i = 0; i <= k; i++) {
      long long mi = 1e9;
      for (long long j = 0; j <= (m - 1 - k); j++) {
        long long p = n - k + i;
        long long q = m - 1 - k - j;
        mi = min(mi, max(a[i + j], a[p - q - 1]));
      }
      ma = max(ma, mi);
    }
    cout << ma << "\n";
  }
}
