#include <bits/stdc++.h>
const int N = 7e3 + 37;
int n, m, k, l, r, ans, lans;
int a[N];
int main() {
  for (scanf("%*d"); ~scanf("%d%d%d", &n, &m, &k);) {
    k = std::min(m - 1, k);
    int len = m - k - 1;
    ans = 0;
    for (int i = 1; i <= n; i++) scanf("%d", a + i);
    if (m - k == 1) {
      for (int i = 1; i <= n; i++)
        if (n < i + m || m >= i) ans = std::max(ans, a[i]);
      printf("%d\n", ans);
      continue;
    }
    for (int i = 0; i <= k; i++) {
      lans = 1e9;
      for (int j = 0; j <= len; j++)
        lans = std::min(lans, std::max(a[i + 1 + j], a[n - k + i - len + j]));
      ans = std::max(ans, lans);
    }
    printf("%d\n", ans);
  }
}
