#include <bits/stdc++.h>
using namespace std;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
const int N = 4e3 + 7;
const int mod = 1e9 + 7;
const long long inf = 1e18 + 7;
long long t, m, n, k;
long long a[N], tmp[N];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    k = min(k, m - 1);
    long long c = m - 1 - k, ans = 0;
    for (int i = 0; i <= k; i++) {
      long long now = inf;
      for (int j = 0; j <= c; j++) {
        now = min(now, max(a[i + j + 1], a[n - (k - i) - (c - j)]));
      }
      ans = max(ans, now);
    }
    cout << ans << "\n";
  }
  return 0;
}
