#include <bits/stdc++.h>
using namespace std;
int read() {
  int xx = 0, ff = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    xx = xx * 10 + ch - '0';
    ch = getchar();
  }
  return xx * ff;
}
long long READ() {
  long long xx = 0, ff = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    xx = xx * 10 + ch - '0';
    ch = getchar();
  }
  return xx * ff;
}
char one() {
  char ch = getchar();
  while (ch == ' ' || ch == '\n') ch = getchar();
  return ch;
}
const int maxn = 3510;
int m, n, k, a[maxn];
int main() {
  for (int _ = read(); _; _--) {
    m = read(), n = read(), k = read();
    for (int i = 1; i <= m; i++) a[i] = read();
    if (k >= n) k = n - 1;
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int L = i, R = k - i;
      R = m - R + 1;
      int res = 1 << 30;
      for (int j = 0; j <= n - 1 - k; j++) {
        res = min(res, max(a[L + j + 1], a[R - (n - 1 - k - j) - 1]));
      }
      ans = max(ans, res);
    }
    printf("%d\n", ans);
  }
  return 0;
}
