#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t, n, k, m, i, j, jj, tans, ans, start, end, mans;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    long long int a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    mans = -1;
    k = min(k, m - 1);
    for (i = 0; i <= k; i++) {
      start = i;
      end = n - (k - i) - 1;
      ans = 1000000000000000000;
      for (j = 0; j <= (m - 1 - k); j++) {
        jj = m - 1 - k - j;
        tans = -1;
        if (start + j <= end) tans = a[start + j];
        if (end - jj >= start) tans = max(tans, a[end - jj]);
        ans = min(ans, tans);
      }
      mans = max(mans, ans);
    }
    cout << mans << endl;
  }
}
