#include <bits/stdc++.h>
using namespace std;
int t, n, m, k, a, b, ans;
int maxl = 1e9;
int num[300005];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &m, &k);
    if (m <= k) k = m - 1;
    a = n - m + 1;
    b = n - k;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &num[i]);
    }
    ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i + b - 1 > n) break;
      int ansl = maxl;
      for (int j = i; j <= i + b - 1; j++) {
        if (j + a - 1 > i + b - 1) break;
        ansl = min(ansl, max(num[j], num[j + a - 1]));
      }
      ans = max(ans, ansl);
    }
    printf("%d\n", ans);
  }
  return 0;
}
