#include <bits/stdc++.h>
using namespace std;
int n, m, k, t, a[100001], x[100001];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &m, &k);
    k = min(m, k);
    memset(x, 0, sizeof(x));
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    for (int i = 1; i <= m; ++i) x[i] = max(a[i], a[n - m + i]);
    multiset<int> s;
    if (m == k) {
      int ans = 0;
      for (int i = 1; i <= m; ++i) ans = max(ans, a[i]);
      for (int i = n - k + 1; i <= n; ++i) ans = max(ans, a[i]);
      printf("%d\n", ans);
      continue;
    }
    for (int i = 1; i <= m - k; ++i) s.insert(x[i]);
    int l = 1, r = m - k, ans = 0;
    while (r <= n) {
      ans = max(ans, *s.begin());
      s.erase(s.find(x[l++]));
      r++;
      if (r > n) break;
      s.insert(x[r]);
    }
    printf("%d\n", ans);
  }
  return 0;
}
