#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  k = min(k, m - 1);
  vi v(n);
  for (int& x : v) cin >> x;
  int w1 = n - k;
  int w2 = n - (m - 1);
  int ans = 0;
  for (int i = w1 - 1; i < n; ++i) {
    int temp = INT_MAX;
    for (int j = i - w1 + w2; j <= i; ++j) {
      temp = min(temp, max(v[j], v[j - w2 + 1]));
    }
    ans = max(ans, temp);
  }
  cout << ans << '\n';
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int tc;
  cin >> tc;
  while (tc--) {
    solve();
  }
  return 0;
}
