#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T = 1;
  cin >> T;
  while (T--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int K = k;
    k = min(k, m - 1);
    int ans = 0;
    for (int l = 0; l <= k; l++) {
      for (int r = k - l; r <= (k - l); r++) {
        int nl = l, nr = n - 1 - r;
        int rem = m - 1 - (l + r);
        int curr = INT_MAX;
        for (int j = 0; j <= rem; j++) {
          curr = min(curr, max(a[nl + j], a[nr - (rem - j)]));
        }
        ans = max(ans, curr);
      }
    }
    cout << ans << '\n';
  }
}
