#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long ar[n + 1];
    memset(ar, -1, sizeof(ar));
    for (long long i = 1; i <= n; i++) cin >> ar[i];
    long long first = 0, second = n;
    long long mim = -1;
    for (long long i = 0; i <= min(m - 1, k); i++) {
      first = i + 1;
      second = n - (k - i);
      long long op_first = first;
      long long op_second = second;
      long long mxm = LLONG_MAX;
      for (long long j = 0; j < m - min(m - 1, k); j++) {
        op_first = first + j;
        op_second = second - (m - 1 - k - j);
        mxm = min(mxm, max(ar[op_first], ar[op_second]));
      }
      mim = max(mim, mxm);
    }
    cout << mim << "\n";
  }
}
