#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  scanf("%lld", &t);
  while (t--) {
    long long n, m, k, ans = 0;
    scanf("%lld %lld %lld", &n, &m, &k);
    vector<long long> v(n);
    for (long long i = 0; i < n; i++) {
      scanf("%lld", &v[i]);
    }
    k = min(k, m - 1);
    long long req = n - m + 1;
    for (long long l = 0; l < n; l++) {
      long long r = l + (n - k) - 1;
      long long cur_ans = 1e9 + 5;
      if (r >= n) break;
      for (long long i = l; i + req - 1 <= r; i++) {
        cur_ans = min(cur_ans, max(v[i], v[i + req - 1]));
      }
      ans = max(ans, cur_ans);
    }
    printf("%lld\n", ans);
  }
}
