#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-7;
const long long MOD = 1000000007LL;
const int INF = 0x3f3f3f3f;
const int _NAN = -0x3f3f3f3f;
const double EULC = 0.5772156649015328;
const int NIL = -1;
template <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  long long f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
const int maxn = 1e4 + 10;
int arr[maxn];
int main(void) {
  int t;
  scanf("%d", &t);
  while (t--) {
    memset(arr, 0, sizeof(arr));
    int m, n, k;
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 0; i < n; ++i) scanf("%d", &arr[i]);
    int ans = -1;
    if (k >= m) k = m - 1;
    for (int i = 0; i <= k; ++i) {
      int temp = INF;
      for (int z = 0; z <= m - k - 1; ++z)
        temp = min(temp, max(arr[z + i], arr[z + i + n - m]));
      ans = max(ans, temp);
    }
    printf("%d\n", ans);
  }
  return 0;
}
