#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long mint = 0x7fffffff;
const long long linf = 1000000000000000000LL;
const long long mod = 998244353LL;
const double eps = 1e-3;
const int N = 100020;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main(void) {
  for (int _ = read(); _ > 0; _--) {
    int n, m, k, ans = 0;
    n = read(), m = read(), k = read();
    vector<int> v(n);
    for (int i = 0; i < n; i++) v[i] = read();
    for (int l2 = 0; l2 <= min(k, m - 1); l2++) {
      int tans = inf;
      for (int l1 = 0; l1 <= max(0, m - 1 - k); l1++) {
        int tl = l1, tr = n - 1 - max(m - 1 - k - tl, 0);
        tans = min(tans, max(v[min(tl + l2, tr)],
                             v[max(tl, tr - (min(k, m - 1) - l2))]));
      }
      ans = max(tans, ans);
    }
    printf("%d\n", ans);
  }
  return 0;
}
