#include <bits/stdc++.h>
using namespace std;
const int maxn = 3500 + 10;
const int maxm = 8 + 5;
const long long mod = 1e9 + 7;
int t;
int n, m, k;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    int lef;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    if (m - 1 > k) {
      lef = m - 1 - k;
    } else {
      lef = 0;
      k = m - 1;
    }
    int s = 0;
    for (int i = 0; i <= k; i++) {
      int tmp = 1e9;
      for (int j = 0; j <= lef; j++) {
        tmp = min(tmp, max(a[i + j + 1], a[n - (lef - j) - (k - i)]));
      }
      s = max(s, tmp);
    }
    cout << s << endl;
  }
  return 0;
}
