#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a(n);
    for (int &v : a) cin >> v;
    m--;
    k = min(k, m);
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int t;
      for (int j = 0; j <= m - k; j++) {
        int cad = max(a[i + j], a[n - 1 - (k - i) - (m - k - j)]);
        if (!j)
          t = cad;
        else
          t = min(t, cad);
      }
      ans = max(ans, t);
    }
    cout << ans << '\n';
  }
}
