#include <bits/stdc++.h>
using namespace std;
const int maxn = 3555;
int t, n, m, k, a[maxn];
const int inf = 0x7fffffff;
int main(void) {
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int c = min(m - 1, k), ans = 0, x = inf;
    int uc = m - 1 - c;
    for (int i = 1; i <= c + 1; i++) {
      x = inf;
      for (int j = i; j <= i + uc; j++) {
        x = min(x, max(a[j], a[n - c - 1 + j - uc]));
      }
      ans = max(x, ans);
    }
    cout << ans << '\n';
  }
}
