#include <bits/stdc++.h>
using namespace std;
int a[3507];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    scanf("%d%d%d", &n, &m, &k);
    int before = m - 1, after = n - m;
    k = min(k, before);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    int ans = 0;
    for (int ctrl = 0; ctrl <= k; ctrl++) {
      int tmpAns = (int)1e9 + 7;
      for (int other = 0; other <= before - k; other++) {
        int caseAns = max(a[ctrl + other], a[ctrl + other + after]);
        tmpAns = min(tmpAns, caseAns);
      }
      ans = max(ans, tmpAns);
    }
    printf("%d\n", ans);
  }
  return 0;
}
