#include <bits/stdc++.h>
using namespace std;
long long dp[3505][3505], A[3505], i, j, n, m, k, ans;
long long r(long long s, long long e) {
  if (s + e == m - 1) return max(A[s], A[n - e - 1]);
  if (dp[s][e] != -1) return dp[s][e];
  return dp[s][e] = min(r(s + 1, e), r(s, e + 1));
}
void solve() {
  cin >> n >> m >> k;
  k = min(k, m - 1);
  for (i = 0; i < n; i++) cin >> A[i];
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) dp[i][j] = -1;
  ans = r(0, 0);
  for (i = 0; i < n; i++) {
    for (j = 0; (i + j) <= k; j++) {
      ans = max(ans, r(i, j));
    }
  }
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test = 0, t;
  cin >> t;
  while (test++ < t) {
    solve();
  }
}
