#include <bits/stdc++.h>
using namespace std;
const int N = 3505;
int T, n, m, k;
int a[N], s[N];
void solve() {
  scanf("%d%d%d", &n, &m, &k);
  m--;
  k = min(k, m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(s, 63, sizeof(s));
  for (int x = 1; x <= k + 1; x++) {
    int y = x + n - k - 1;
    for (int l = x; l <= y - n + m + 1; l++) {
      int r = l + n - m - 1;
      s[x] = min(s[x], max(a[l], a[r]));
    }
  }
  printf("%d\n", *max_element(s + 1, s + 1 + k + 1));
  return;
}
int main() {
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
