#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
template <class T = int>
T __rand(T range = numeric_limits<T>::max()) {
  return (T)(rng() % range);
}
int debug = 0;
int __db_level = 0;
struct debug_block {
  string name;
  debug_block(const string& name_) : name(name_) {
    if (debug) cerr << string(__db_level * 2, ' ') << "{ " << name << endl;
    ++__db_level;
  }
  ~debug_block() {
    --__db_level;
    if (debug) cerr << string(__db_level * 2, ' ') << "} " << name << endl;
  }
};
template <class U, class V>
ostream& operator<<(ostream& out, const pair<U, V>& p) {
  return out << "(" << p.first << ", " << p.second << ")";
}
template <class A, class B>
ostream& operator<<(ostream& out, const tuple<A, B>& t) {
  return out << "(" << get<0>(t) << ", " << get<1>(t) << ")";
}
template <class A, class B, class C>
ostream& operator<<(ostream& out, const tuple<A, B, C>& t) {
  return out << "(" << get<0>(t) << ", " << get<1>(t) << ", " << get<2>(t)
             << ")";
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& container) {
  out << "{";
  if (((int)container.size())) out << container[0];
  for (int i = 0; i++ < ((int)container.size()) - 1;)
    out << ", " << container[i];
  return out << "}";
}
template <class x>
vector<typename x::value_type> $v(const x& a) {
  return vector<typename x::value_type>(a.begin(), a.end());
}
template <class u>
vector<typename iterator_traits<u>::value_type> $v(u a, u b) {
  return vector<typename iterator_traits<u>::value_type>(a, b);
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int ntest;
  cin >> ntest;
  for (int testcase = 0; testcase++ < ntest;) {
    ;
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a(n);
    for (auto& i : a) cin >> i;
    int ans = 0;
    k = min(k, m - 1);
    int left = m - 1 - k;
    int width = n - k - left;
    if (debug)
      cerr << string(__db_level * 2, ' ') << "["
           << "width"
           << "] = [" << width << "]" << endl;
    for (int i = -1; ++i < k + 1;) {
      int cur_ans = INT_MAX;
      for (int f = -1; ++f < left + 1;) {
        int t = max(a[i + f], a[i + f + width - 1]);
        if (debug)
          cerr << string(__db_level * 2, ' ') << "["
               << "i _ f _ t"
               << "] = [" << i << ", " << f << ", " << t << "]" << endl;
        cur_ans = min(cur_ans, t);
      }
      if (debug)
        cerr << string(__db_level * 2, ' ') << "["
             << "i _ cur_ans"
             << "] = [" << i << ", " << cur_ans << "]" << endl;
      ans = max(ans, cur_ans);
    }
    cout << ans << '\n';
  }
  return 0;
}
