#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    f = ch == '-' ? -1 : 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
const long long N = 3505;
long long n, m, k;
long long a[N];
signed main() {
  long long T = read();
  while (T--) {
    n = read();
    m = read();
    k = read();
    for (long long i = 1; i <= n; i++) a[i] = read();
    long long ans = 0, len = n - m;
    k = min(k, m - 1);
    for (long long i = 0; i <= k; i++) {
      long long temp = 2147483647;
      for (long long j = 0; j <= m - 1 - k; j++) {
        temp = min(temp, max(a[1 + i + j], a[n - (m - i - j) + 1]));
      }
      ans = max(ans, temp);
    }
    printf("%lld\n", ans);
  }
}
