#include <bits/stdc++.h>
using namespace std;
const long long int N = 3 * 1e6 + 2;
long long int n, k;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int tt;
  cin >> tt;
  for (long long int qq = 1; qq <= tt; ++qq) {
    long long int m;
    cin >> n >> m >> k;
    vector<long long int> v(n);
    for (long long int i = 0; i < n; i++) cin >> v[i];
    k = min(k, m - 1);
    long long int res = 0;
    long long int len = n - m + 1;
    for (long long int i = 0; i <= k; ++i) {
      long long int cur = 1e12;
      for (long long int j = 0; j + k <= m - 1; ++j) {
        if (i + j + len - 1 > n - 1) continue;
        long long int t = max(v[i + j], v[i + j + len - 1]);
        cur = min(cur, t);
      }
      res = max(res, cur);
    }
    cout << res << '\n';
  }
  return 0;
}
