#include <bits/stdc++.h>
using namespace std;
int t;
int n, m, k;
int a[100010];
int main() {
  int i, j;
  scanf("%d", &t);
  while (t--) {
    int ans = 0;
    scanf("%d%d%d", &n, &m, &k);
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    if (k >= m - 1) {
      int t1 = 1, t2 = n - (m - 1);
      while (1) {
        ans = max(ans, max(a[t1], a[t2]));
        t1++;
        t2++;
        if (t2 > n) break;
      }
      cout << ans << endl;
      continue;
    }
    int p1 = 1, p2 = n - k;
    while (1) {
      int po1 = p1, po2 = p2 - (m - k - 1);
      int tmp = 2147483642;
      while (1) {
        tmp = min(tmp, max(a[po1], a[po2]));
        po1++;
        po2++;
        if (po2 > p2) break;
      }
      ans = max(ans, tmp);
      p1++;
      p2++;
      if (p2 > n) break;
    }
    cout << ans << endl;
  }
  return 0;
}
