#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, k;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    vector<int> arr(n), tmp;
    for (auto &a : arr) cin >> a;
    k = min(k, m - 1);
    for (int i = 0; i < m; i++) tmp.push_back(max(arr[i], arr[n - m + i]));
    int ans = -0x3f3f3f3f;
    for (int i = 0; i <= k; i++) {
      ans = max(*min_element(tmp.begin() + i, tmp.end() - (k - i)), ans);
    }
    cout << ans << endl;
  }
}
