#include <bits/stdc++.h>
long long mod = 1000000007;
using namespace std;
int n, m, k;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int a[3501];
int b[3501];
int main() {
  int i, j, fl, test;
  scanf("%d", &test);
  while (test--) {
    int ans = INT_MAX;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      b[i] = -1;
      ans = min(ans, a[i]);
    }
    k = min(k, m - 1);
    int sp = n - m + 1;
    for (i = 0; i < n; i++) {
      if (i + sp - 1 == n) {
        break;
      }
      b[i] = max(a[i], a[i + sp - 1]);
      mx = max(mx, b[i]);
    }
    int eater = m - 1 - k;
    if (eater <= 0) {
      printf("%d\n", mx);
      continue;
    }
    set<int> S;
    for (i = 0; i < n; i++) {
      int mini = INT_MAX;
      if (i + (n - k - sp + 1) == n + 1) {
        break;
      }
      for (j = i; j < i + (n - k - sp + 1); j++) {
        mini = min(mini, b[j]);
      }
      ans = max(mini, ans);
    }
    for (i = 0; i < n; i++) {
      b[i] = 0;
    }
    printf("%d\n", ans);
  }
  return 0;
}
