#include <bits/stdc++.h>
using namespace std;
constexpr int kN = int(4E3 + 10), kInf = int(1E9 + 10);
int a[kN];
void solve() {
  int n, m, k, lft, ans = 0, tmp;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  m--;
  k = min(k, m);
  lft = m - k;
  for (int i = 0; i <= k; i++) {
    tmp = kInf;
    for (int j = 0; j <= lft; j++)
      tmp = min(tmp, max(a[i + j + 1], a[n - (k - i) - (lft - j)]));
    ans = max(ans, tmp);
  }
  printf("%d\n", ans);
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
