#include <bits/stdc++.h>
using namespace std;
int n, m, k, t;
int a[3512];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 0; i < n; i++) cin >> a[i];
    k = min(m - 1, k);
    int res = -1;
    for (int i = 0; i <= k; i++) {
      int p = m - k;
      int mn = 1e9;
      for (int j = 0; j < p; j++)
        mn = min(max(a[i + j], a[i + j + n - k - p]), mn);
      res = max(res, mn);
    }
    cout << res << "\n";
  }
}
