#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &item) {
  out << '(' << item.first << ", " << item.second << ')';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  for (const auto &item : v) out << item << ' ';
  return out;
}
int t, n, m, k;
int V[3505], A[3505];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) {
      cin >> V[i];
    }
    k = min(k, m - 1);
    int rem = n - m + 1;
    for (int i = rem; i <= n; i++) {
      A[i] = max(V[i - rem + 1], V[i]);
    }
    int a = 1, b = n - k;
    int out = m - k - 1;
    multiset<int> S;
    for (int i = b; i >= b - out; i--) {
      S.insert(A[i]);
    }
    int ans = -1e9;
    for (; b <= n; a++, b++) {
      ans = max(ans, *(S.begin()));
      S.erase(S.find(A[b - out]));
      S.insert(A[b + 1]);
    }
    for (int i = rem; i <= n; i++) A[i] = 0;
    for (int i = 1; i <= n; i++) V[i] = 0;
    cout << ans << '\n';
  }
  return 0;
}
