#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long MOD = 1000000007;
vector<long long> vec;
long long n, m, k;
long long solve(long long a, long long b) {
  long long r = m - k - 1, ans = 100000000000;
  for (long long i = 0; i <= r; ++i)
    ans = min(ans, max(vec[a + i], vec[b - (r - i)]));
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long ans = 0;
    cin >> n >> m >> k;
    k = min(k, m - 1);
    vec.resize(n);
    for (auto& it : vec) cin >> it;
    for (long long i = 0; i <= k; ++i)
      ans = max(ans, solve(i, n - (k - i) - 1));
    vec.clear();
    cout << ans << "\n";
  }
  return 0;
}
