#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 4e3 + 10;
int a[N];
int main() {
  int ncase;
  scanf("%d", &ncase);
  while (ncase--) {
    int n, m, k;
    scanf("%d%d%d", &n, &m, &k);
    int k1 = min(m - 1, k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    int k2 = m - 1 - k1;
    int ans = 0;
    for (int i = 0; i <= k1; i++) {
      int minv = INF;
      for (int j = 0; j <= k2; j++) {
        minv = min(minv, max(a[i + j + 1], a[n - (k1 - i) - (k2 - j)]));
      }
      ans = max(minv, ans);
    }
    printf("%d\n", ans);
  }
  return 0;
}
