#include <bits/stdc++.h>
int a[100000], b[100000], t[400000];
inline void build(int k, int l, int r) {
  if (l == r) {
    t[k] = b[l];
    return;
  }
  build((k << 1), l, ((l + r) >> 1));
  build((k << 1 | 1), ((l + r) >> 1) + 1, r);
  t[k] = std::min(t[(k << 1)], t[(k << 1 | 1)]);
}
inline int query(int k, int l, int r, int ql, int qr) {
  if (ql <= l and r <= qr) return t[k];
  if (qr <= ((l + r) >> 1)) return query((k << 1), l, ((l + r) >> 1), ql, qr);
  if (ql > ((l + r) >> 1))
    return query((k << 1 | 1), ((l + r) >> 1) + 1, r, ql, qr);
  return std::min(query((k << 1), l, ((l + r) >> 1), ql, qr),
                  query((k << 1 | 1), ((l + r) >> 1) + 1, r, ql, qr));
}
signed main() {
  int T, n, m, k, ans;
  for (scanf("%d", &T); T--;) {
    scanf("%d%d%d", &n, &m, &k);
    k = std::min(m - 1, k);
    ans = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= m; i++) b[i] = std::max(a[i], a[i + n - m]);
    build(1, 1, m);
    for (int l = 0; l <= k; l++)
      for (int r = 0; l + r <= k; r++)
        ans = std::max(ans, query(1, 1, m, l + 1, m - r));
    printf("%d\n", ans);
  }
  return 0;
}
