#include <bits/stdc++.h>
using namespace std;
const int N = 3510, mod = 1e9 + 7;
int T;
int n, m, k;
int a[N];
int main() {
  cin >> T;
  while (T--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    if (k > m - 1) k = m - 1;
    int res = 0;
    for (int i = 0; i <= k; i++) {
      int t = 0x3f3f3f3f;
      for (int j = 0; j <= m - 1 - k; j++) {
        int s = max(a[1 + i + j], a[i + j + 1 + n - m]);
        t = min(t, s);
      }
      res = max(res, t);
    }
    cout << res << endl;
  }
  return 0;
}
