#include <bits/stdc++.h>
using namespace std;
int T, n, m, k, ar[3555], cnt, dis[3555], ans, del[3555];
struct node {
  int nm, id, p;
} mayb[3555];
int main() {
  scanf("%d", &T);
  while (T--) {
    memset(ar, 0, sizeof(ar));
    memset(mayb, 0, sizeof(mayb));
    memset(dis, 0, sizeof(dis));
    ans = 0;
    cnt = 0;
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 1; i <= n / 2 + 1; i++) dis[i] = dis[n + 1 - i] = i;
    for (int i = 1; i <= n; i++) scanf("%d", &ar[i]);
    for (int i = 1; i <= m; i++) {
      if (ar[i] > ar[i + n - m]) {
        mayb[++cnt].id = i;
        mayb[cnt].nm = ar[i];
        mayb[cnt].p = i;
      } else if (ar[i] < ar[i + n - m]) {
        mayb[++cnt].p = i + n - m;
        mayb[cnt].id = i + n - m;
        mayb[cnt].nm = ar[i + n - m];
      } else {
        mayb[++cnt].id = i;
        mayb[cnt].nm = ar[i];
        mayb[cnt].p = i + n - m;
      }
    }
    k = min(k, m - 1);
    for (int i = 0; i <= k; i++) {
      int b = 1e9;
      for (int j = i + 1; j <= m - k + i; j++) {
        if (mayb[j].id <= i || mayb[j].p >= n + 1 - (k - i))
          continue;
        else
          b = min(b, mayb[j].nm);
      }
      ans = max(ans, b);
    }
    printf("%d\n", ans);
  }
}
