#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
constexpr int N = 2e5 + 5;
constexpr int mod = 1e9 + 7;
template <typename T>
void dout(const T& x) {
  cout << x << ' ';
}
template <typename T, typename... Ts>
void dout(const T& v, const Ts&... args) {
  dout(v);
  dout(args...);
}
template <typename... Ts>
void vout(const Ts&... args) {
  dout(args...);
  cout << "\n";
  exit(0);
}
int n, m, k;
vector<int> a;
int get(int st, int fn) { return max(a[st], a[n - fn - 1]); }
void solve() {
  cin >> n >> m >> k;
  a.resize(n);
  for (int& v : a) cin >> v;
  int ans = 0;
  if (k >= m - 1) {
    ans = max(*max_element(a.begin(), a.begin() + m),
              *max_element(a.end() - m, a.end()));
  } else {
    for (int j = 0, temp; j <= k; j++) {
      temp = INT32_MAX;
      for (int i = 0; i <= m - k - 1; i++)
        temp = min(temp, get(i + j, m - k - i - 1 + (k - j)));
      ans = max(ans, temp);
    }
  }
  cout << ans << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int tests;
  cin >> tests;
  while (tests--) solve();
  return 0;
}
