#include <bits/stdc++.h>
using namespace std;
const int MX = 3505;
int a[MX];
void solve() {
  int n, m, k;
  ignore = scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < n; i++) {
    ignore = scanf("%d", a + i);
  }
  int len = n - m + 1;
  int ans = 1;
  int L = 1, R = 1000000000;
  while (L <= R) {
    int M = (L + R) / 2;
    bool good = false;
    for (int l = 0; l <= min(m - 1, k); l++) {
      int r = min(k - l, m - 1 - l);
      bool ok = true;
      for (int i = l; i + len - 1 < n - r; i++) {
        ok = ok && (a[i] >= M || a[i + len - 1] >= M);
      }
      if (ok) {
        good = true;
        break;
      }
    }
    if (good) {
      ans = M;
      L = M + 1;
    } else {
      R = M - 1;
    }
  }
  printf("%d\n", ans);
}
int main() {
  int tests;
  ignore = scanf("%d", &tests);
  while (tests--) {
    solve();
  }
}
