#include <bits/stdc++.h>
using namespace std;
void __print(long long x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long mod = 1e9 + 7;
long long go(vector<long long> v, long long pos) {
  long long n = v.size() - 1;
  long long res = INT_MAX;
  ;
  for (long long i = 0; i <= pos; i++) {
    res = min(res, max(v[i + 1], v[n - pos + i]));
  }
  return res;
}
void solve() {
  long long n, m, k, ans = -1;
  cin >> n >> m >> k;
  vector<long long> data(n + 2);
  for (long long i = 1; i <= n; i++) cin >> data[i];
  k = min(k, m - 1);
  for (long long i = 0; i <= k; i++) {
    vector<long long> v(1);
    for (long long j = i + 1; j <= (n - k + i); j++) {
      v.push_back(data[j]);
    }
    ans = max(ans, go(v, m - k - 1));
  }
  cout << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  clock_t t1 = clock();
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  clock_t t2 = clock();
}
