#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e3 + 10;
int a[maxn];
int T, n, m, k;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    if (k > m - 1) k = m - 1;
    int cnt = 0;
    for (int aa = 0; aa <= k; aa++) {
      int ans = 1e9 + 10;
      for (int b = 0; b <= m - 1 - k; b++) {
        ans = min(ans, max(a[aa + b + 1], a[aa + n + b - m + 1]));
      }
      cnt = max(cnt, ans);
    }
    printf("%d\n", cnt);
  }
}
