#include <bits/stdc++.h>
using namespace std;
int t, n, m, k, a[350005], ans;
int f(int l, int r) {
  int res = 1e9 + 1;
  for (int i = 0; i <= m; i++) res = min(res, max(a[l + i], a[r + i - m]));
  return res;
}
int main() {
  scanf("%d", &t);
  while (t--) {
    ans = 0;
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    k = min(k, m - 1);
    m -= (k + 1);
    for (int i = 0; i <= k; i++) ans = max(ans, f(i + 1, n - k + i));
    printf("%d\n", ans);
  }
  return 0;
}
