#include <bits/stdc++.h>
using namespace std;
int a[500005], n, m, k;
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    if (k >= m - 1) {
      int res = 0;
      for (int i = 1; i <= m; i++) res = max(res, a[i]);
      for (int i = n, j = 1; i >= 1 and j <= m; i--, j++) res = max(res, a[i]);
      cout << res << endl;
      continue;
    }
    int dontcontrol = m - 1 - k;
    int res = 0;
    for (int i = 0; i <= k; i++) {
      int esq = i, dir = k - i;
      int resaux = 1e9;
      for (int j = 0; j <= dontcontrol; j++) {
        int x = j, y = dontcontrol - j;
        int totesq = esq + x, totdir = dir + y;
        int posesq = totesq + 1, posdir = n - totdir;
        resaux = min(resaux, max(a[posesq], a[posdir]));
      }
      res = max(res, resaux);
    }
    cout << res << endl;
  }
  return 0;
}
