#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
void solve();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(numeric_limits<double>::max_digits10);
  solve();
  return 0;
}
template <typename T>
vector<T> slide_min(const vector<T>& v, int k) {
  deque<int> deq;
  vector<T> ret;
  for (int i = 0; i < v.size(); i++) {
    while (!deq.empty() && v[deq.back()] >= v[i]) {
      deq.pop_back();
    }
    deq.push_back(i);
    if (i - k + 1 >= 0) {
      ret.emplace_back(v[deq.front()]);
      if (deq.front() == i - k + 1) deq.pop_front();
    }
  }
  return ret;
}
class SegmentTree {
  int n;
  vector<int> node;

 public:
  SegmentTree(vector<int> v) {
    n = 1;
    int s = v.size();
    while (n < s) n *= 2;
    node.resize(2 * n - 1, INF);
    for (int i = 0; i < s; i++) node[i + n - 1] = v[i];
    for (int i = n - 2; i >= 0; i--)
      node[i] = min(node[2 * i + 1], node[2 * i + 2]);
  }
  void update(int x, int val) {
    x += (n - 1);
    node[x] = val;
    while (x > 0) {
      x = (x - 1) / 2;
      node[x] = min(node[2 * x + 1], node[2 * x + 2]);
    }
  }
  int find(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    if (r <= a || b <= l) return INF;
    if (a <= l && r <= b) return node[k];
    int vl = find(a, b, 2 * k + 1, l, (l + r) / 2);
    int vr = find(a, b, 2 * k + 2, (l + r) / 2, r);
    return min(vl, vr);
  }
};
void solve() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a(n);
    for (int i = (0); i < ((n)); i++) cin >> a[i];
    vector<int> v(m);
    for (int i = (0); i < ((m)); i++) v[i] = max(a[i], a[n - m + i]);
    SegmentTree st(v);
    int ans = 0;
    if (m > k) {
      for (int i = (0); i < ((k + 1)); i++) {
        chmax(ans, st.find(i, m - k + i));
      }
    } else {
      k = m - 1;
      for (int i = (0); i < ((k + 1)); i++) {
        chmax(ans, st.find(i, m - k + i));
      }
    }
    cout << ans << '\n';
    ;
  }
}
