#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x7fffffffffffffff;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 5;
int dpmin[maxn][30];
int dpmax[maxn][30];
int a[maxn], n, m, k;
void rmqinit() {
  for (int j = 1; (1 << j) <= n; j++)
    for (int i = 1; i + (1 << j) < n + 2; i++) {
      dpmin[i][j] = min(dpmin[i][j - 1], dpmin[i + (1 << (j - 1))][j - 1]);
      dpmax[i][j] = max(dpmax[i][j - 1], dpmax[i + (1 << (j - 1))][j - 1]);
    }
}
int rmqmin(int l, int r) {
  int k = log(r - l + 1) / log(2);
  return min(dpmin[l][k], dpmin[r - (1 << k) + 1][k]);
}
int rmqmax(int l, int r) {
  int k = log(r - l + 1) / log(2);
  return max(dpmax[l][k], dpmax[r - (1 << k) + 1][k]);
}
void solve() {
  cin >> n >> m >> k;
  k = min(m - 1, k);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    dpmin[i][0] = dpmax[i][0] = a[i];
  }
  rmqinit();
  int l = 1, r = (n - k);
  m -= k;
  int tmp = r - m;
  int ans = 0;
  while (l <= n && r <= n) {
    int sum = inf;
    for (int i = l; i + tmp <= r; i++) {
      sum = min(sum, max(a[i], a[i + tmp]));
    }
    ans = max(ans, sum);
    l++, r++;
  }
  cout << ans << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int T;
  cin >> T;
  while (T--) solve();
}
