#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) {
  return (max(a, b) / gcd(a, b)) * min(a, b);
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> v;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      v.push_back(x);
    }
    if (k > m - 1) k = m - 1;
    long long ans = 0;
    for (long long i = 0; i < k + 1; i++) {
      long long mi = LONG_LONG_MAX;
      for (long long j = 0; j <= m - k - 1; j++) {
        mi = min(mi, max(v[i + j], v[n - (k - i) - (m - k - 1 - j) - 1]));
      }
      ans = max(ans, mi);
    }
    cout << ans << endl;
  }
  return 0;
}
