#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const double eps = 1e-9;
const long long INF = 0x3f3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
inline int read() {
  int ret = 0, sgn = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') sgn = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * sgn;
}
inline void Out(int a) {
  if (a > 9) Out(a / 10);
  putchar(a % 10 + '0');
}
long long __gcd(long long a, long long b) {
  return b == 0 ? a : __gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / __gcd(a, b); }
long long qpow(long long a, long long b, long long mod) {
  if (a >= mod) a = a % mod + mod;
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans * a;
      if (ans >= mod) ans = ans % mod + mod;
    }
    a *= a;
    if (a >= mod) a = a % mod + mod;
    b >>= 1;
  }
  return ans;
}
int Fermat(int a, int p) { return qpow(a, p - 2, p); }
int exgcd(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  int g = exgcd(b, a % b, x, y);
  int t = x;
  x = y;
  y = t - a / b * y;
  return g;
}
int mod_reverse(int a, int p) {
  int d, x, y;
  d = exgcd(a, p, x, y);
  if (d == 1)
    return (x % p + p) % p;
  else
    return -1;
}
long long china(int a[], int b[], int n) {
  int M = 1, y, x = 0;
  for (int i = 0; i < n; ++i) M *= a[i];
  for (int i = 0; i < n; ++i) {
    int w = M / a[i];
    int tx = 0;
    int t = exgcd(w, a[i], tx, y);
    x = (x + w * (b[i] / t) * x) % M;
  }
  return (x + M) % M;
}
const int N = 3e3 + 600;
int a[N];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int ans = 0;
    int n, m, k;
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    if (k >= m - 1) {
      for (int i = 1; i <= m; i++) {
        ans = max(ans, a[i]);
      }
      for (int i = n; i >= n - m + 1; i--) {
        ans = max(ans, a[i]);
      }
      cout << ans << '\n';
      continue;
    }
    int z = m - 1 - k;
    for (int i = 0; i <= k; i++) {
      int now = inf;
      for (int j = 0; j <= z; j++) {
        int l = i + j + 1;
        int r = n - (k - i) - (z - j);
        now = min(now, max(a[l], a[r]));
      }
      ans = max(ans, now);
    }
    cout << ans << '\n';
  }
  return 0;
}
