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