#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e6 + 5;
int T, n, m, k, t[MAXN];
int main() {
  scanf("%d", &T);
  while (T--) {
    int maxx = 0;
    scanf("%d%d%d", &n, &m, &k);
    for (register int i = 1; i <= n; i++) scanf("%d", &t[i]);
    k = min(k, m - 1);
    int u = m - 1 - k;
    for (register int i = 0; i <= k; i++) {
      int ans = 0x3f3f3f3f;
      for (register int j = 0; j <= u; j++)
        ans = min(ans, max(t[1 + i + j], t[n - k + i - u + j]));
      maxx = max(maxx, ans);
    }
    printf("%d\n", maxx);
  }
  return 0;
}
