#include <bits/stdc++.h>
using namespace std;
const long double Pi = 3.141592653;
const unsigned long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    if (k >= m) k = m - 1;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int ans = -1;
    for (int i = 0; i <= k; i++) {
      int temp = INT_MAX;
      for (int j = 0; j <= m - 1 - k; j++) {
        temp = min(temp, max(a[i + j], a[i + j + n - m]));
      }
      ans = max(ans, temp);
    }
    cout << ans << "\n";
  }
  return 0;
}
