#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[(3555)];
int dp[(3555)][(3555)];
int dp_M(int l, int r) {
  if ((n - r) + (l - 1) == m - 1) return max(a[l], a[r]);
  if (~dp[l][r]) return dp[l][r];
  return dp[l][r] = min(dp_M(l + 1, r), dp_M(l, r - 1));
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; ++i) cin >> a[i];
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) dp[i][j] = -1;
    int Ans = 0, len;
    if (k > m - 1) k = m - 1;
    len = n - k;
    for (int i = 1; i + len - 1 <= n; ++i) Ans = max(Ans, dp_M(i, i + len - 1));
    cout << Ans << endl;
  }
  return 0;
}
