#include <bits/stdc++.h>
using namespace std;
int a[3501], b[3501];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, m, k;
    scanf("%d %d %d", &n, &m, &k);
    if (k >= m) k = m - 1;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= m; i++) b[i] = max(a[i], a[i + n - m]);
    deque<int> q;
    int len = m - k, ans = 0;
    for (int i = 1; i <= m; i++) {
      while (!q.empty() && b[i] < b[q.back()]) q.pop_back();
      q.push_back(i);
      if (q.front() == i - len) q.pop_front();
      if (i >= len) ans = max(ans, b[q.front()]);
    }
    printf("%d\n", ans);
  }
  return 0;
}
