#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, k, ans, sum;
  cin >> t;
  vector<int> a;
  while (t--) {
    cin >> n >> m >> k;
    ans = INT_MIN;
    a.resize(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    k = min(k, m - 1);
    for (int i = 0; i <= k; i++) {
      sum = INT_MAX;
      for (int j = 0; j < (m - k); j++) {
        sum = min(sum, max(a[i + j], a[i + j + n - m]));
      }
      ans = max(sum, ans);
    }
    cout << ans << endl;
  }
}
