#include <bits/stdc++.h>
using namespace std;
void READ(vector<long long> &v, long long n) {
  long long a;
  for (long long i = 0; i < n; i = i + 1) {
    cin >> a;
    v.push_back(a);
  }
}
void PRINT(vector<long long> &v) {
  long long a;
  for (long long i = 0; i < v.size(); i = i + 1) {
    cout << v[i] << " ";
  }
  cout << "\n";
}
long long power(long long k, long long n, long long m = 1000000007) {
  long long res = 1;
  while (n) {
    if (n % 2 != 0) {
      res = (res * k) % m;
    }
    k = (k * k) % m;
    n = n / 2;
  }
  return (res);
}
long long n, m, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.unsetf(std::ios::floatfield);
  std::cout.precision(15);
  long long a, b, c, d, e, x, i, j, t, y, w, z, x1, y1, z1, f;
  double p, q, r, u;
  char ch, chr;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    vector<long long> v;
    READ(v, n);
    if (k >= m) {
      k = m - 1;
    }
    b = 0;
    for (i = 0; i <= k; i = i + 1) {
      a = 0;
      c = 1e18;
      for (j = 0; j <= m - 1 - k; j++) {
        a = max(v[i + j], v[i + j + n - m]);
        c = min(c, a);
      }
      b = max(b, c);
    }
    cout << b << "\n";
  }
}
