#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, k, ans, mx, ar[3505], s1;
  cin >> t;
  while (t--) {
    ans = -1;
    cin >> n >> m >> k;
    s1 = n - m + 1;
    k = min(k, m - 1);
    for (int i = 0; i < n; i++) {
      cin >> ar[i];
    }
    for (int i = 0; i <= k; i++) {
      for (int j = i + s1 - 1; j < n - k + i; j++) {
        if (j == i + s1 - 1)
          mx = max(ar[j], ar[j - s1 + 1]);
        else
          mx = min(mx, max(ar[j], ar[j - s1 + 1]));
      }
      ans = max(mx, ans);
    }
    cout << ans << endl;
  }
}
