#include <bits/stdc++.h>
using namespace std;
const long long llinf = 1987654321987654321;
const int inf = 2000000000;
int t;
int n, m, k;
int arr[3510];
int main() {
  scanf("%d", &t);
  while (t--) {
    int ans = 0;
    scanf("%d %d %d", &n, &m, &k);
    k = min(k, m - 1);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &arr[i]);
    }
    for (int i = 0; i <= k; i++) {
      int fr = 1 + i, re = n - k + i;
      int s = m - 1 - k;
      int temp = inf;
      for (int i = 0; i <= s; i++) {
        temp = min(temp, max(arr[fr + i], arr[re - s + i]));
      }
      ans = max(ans, temp);
    }
    printf("%d\n", ans);
  }
}
