#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int mc = min(k, m - 1), mx = 1;
    for (int i = 0; i <= mc; i++) {
      int mn = 1e9;
      for (int j = 0; j <= m - 1 - mc; j++) {
        mn = min(mn, max(a[i + j], a[i + j + n - m]));
      }
      mx = max(mx, mn);
    }
    cout << mx << '\n';
  }
  return 0;
}
