#include <bits/stdc++.h>
using namespace std;
int T, n, m, k, a[1 << 12];
int main() {
  int T;
  for (cin >> T; T--;) {
    cin >> n >> m >> k, k = min(k, m - 1);
    for (int i = 1; i <= n; i++) scanf("%d", a + i);
    int res = 0;
    for (int l = 0; l <= k; l++) {
      int cur = 1 << 30;
      for (int x = 0; x <= m - k - 1; x++)
        cur = min(cur, max(a[l + x + 1], a[n - (m - l - x - 1)]));
      res = max(res, cur);
    }
    cout << res << endl;
  }
}
