#include <bits/stdc++.h>
using namespace std;
template <typename T, typename V>
ostream &operator<<(ostream &os, const pair<T, V> pai) {
  return os << '(' << pai.first << ' ' << pai.second << ')';
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> v) {
  cout << '[';
  for (auto p : v) cout << p << ",";
  cout << "]";
  return os;
}
template <typename T, typename V>
ostream &operator<<(ostream &os, const set<T, V> v) {
  cout << "{";
  for (auto p : v) cout << p << ",";
  cout << "}";
  return os;
}
template <typename T, typename V>
ostream &operator<<(ostream &os, const map<T, V> v) {
  cout << "{";
  for (auto p : v) cout << p << ",";
  cout << "}";
  return os;
}
template <typename T>
void get_max(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void get_min(T &a, T b) {
  a = min(a, b);
}
const int MAXN = 3510;
int T;
int N, M, K;
int A[MAXN];
int DP[MAXN][MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> T;
  while (T--) {
    cin >> N >> M >> K;
    for (int i = 1; i <= N; i++) cin >> A[i];
    int ans = -1;
    K = min(K, M - 1);
    for (int i = 0; i <= K; i++) {
      int rrr = -1;
      for (int j = 0; j <= M - 1 - K; j++) {
        int res = max(A[i + j + 1], A[N - (M - 1) + (i + j)]);
        if (rrr == -1)
          rrr = res;
        else
          rrr = min(rrr, res);
      }
      if (ans == -1)
        ans = rrr;
      else
        ans = max(ans, rrr);
    }
    cout << ans << '\n';
  }
  return 0;
}
