#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  srand(time(0));
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    k = min(k, m - 1);
    int p = m - k - 1;
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int l1 = i, r1 = n - (k - i) - 1;
      int now = 1e9;
      for (int j = 0; j <= p; j++) {
        int l2 = l1 + j, r2 = r1 - (p - j);
        now = min(now, max(v[l2], v[r2]));
      }
      ans = max(ans, now);
    }
    cout << ans << "\n";
  }
  return 0;
}
