#include <bits/stdc++.h>
using namespace std;
const int N = 5000;
int tbl[N], tbl2[N];
void solve() {
  int m, n, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> tbl[i];
  }
  for (int i = 1; i <= m; i++) {
    tbl2[i] = max(tbl[i], tbl[n - m + i]);
  }
  k = min(k, m - 1);
  int d = m - k;
  int ans = 0;
  for (int i = 1; i <= m - d + 1; i++) {
    int mini = INT_MAX;
    for (int j = i; j < i + d; j++) {
      mini = min(mini, tbl2[j]);
    }
    ans = max(ans, mini);
  }
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
