#include <bits/stdc++.h>
using namespace std;
int ar[3502];
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n, m, k;
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> ar[i];
    int ans = 0;
    k = min(k, m - 1);
    for (int j = 0; j <= k; j++) {
      int r = m - 1 - k;
      int mx = INT_MAX;
      for (int b = 0; b <= r; b++) {
        int ar1 = ar[j + b + 1], ar2 = ar[n - (k - j) - (r - b)];
        mx = min(mx, max(ar1, ar2));
      }
      ans = max(ans, mx);
    }
    cout << ans << endl;
  }
}
