#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> X(n);
    for (int i = 0; i < n; ++i) cin >> X[i];
    if (k >= m - 1) {
      long long maxima = X[0];
      for (int i = 0; i < m; ++i) {
        maxima = max(X[i], maxima);
        maxima = max(X[n - 1 - i], maxima);
      }
      cout << maxima << "\n";
      continue;
    }
    long long ans = 0;
    for (int forward = 0; forward < k + 1; ++forward) {
      int back = k - forward;
      long long temp = 1e9 + 1;
      for (int y = 0; y <= m - 1 - k; ++y) {
        temp =
            min(temp, max(X[forward + y], X[n - 1 - back - (m - 1 - k - y)]));
      }
      ans = max(ans, temp);
    }
    cout << ans << "\n";
  }
  return 0;
}
