#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t, n, m, k;
  long long a[3505], maxx, minn, minnn, d, pos1, pos2;
  cin >> t;
  for (int jjj = 0; jjj < t; jjj++) {
    maxx = 0;
    cin >> n >> m >> k;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    if (k >= m - 1) {
      for (int i = 0; i < m; i++) {
        maxx = max(maxx, a[i]);
      }
      for (int i = 0; i < m; i++) {
        maxx = max(maxx, a[n - i - 1]);
      }
      cout << maxx << '\n';
    } else {
      d = m - k - 1;
      for (int i = 0; i <= k; i++) {
        pos1 = i;
        pos2 = n + i - k - 1;
        minn = 10000000000;
        for (int j = 0; j <= d; j++) {
          minn = min(minn, max(a[pos1 + j], a[pos2 - d + j]));
        }
        maxx = max(maxx, minn);
      }
      cout << maxx << '\n';
    }
  }
}
