#include <bits/stdc++.h>
using namespace std;
int test = 0;
const int MAXN = 200009;
const long long MOD = 119 << 23 | 1;
class {
 public:
  int a[4444], b[4444];
  int n, m, k;
  void solve() {
    int _;
    cin >> _;
    while (_--) {
      cin >> n >> m >> k;
      for (int i = 1; i <= n; ++i) cin >> a[i];
      k = min(m - 1, k);
      int N = n - (m - 1 - k);
      int R = 1 + N - 1, L = 1;
      while (R <= n) {
        cal(L, R);
        L++;
        R++;
      }
      int Max = -1;
      for (int i = 0; i <= k; ++i) {
        Max = max(b[i], Max);
      }
      cout << Max << '\n';
    }
  }
  void cal(int L, int R) {
    if (L == 1) {
      for (int i = 0; i <= k; ++i) {
        b[i] = max(a[L + i], a[R - (k - i)]);
      }
    } else {
      for (int i = 0; i <= k; ++i) {
        b[i] = min(b[i], max(a[L + i], a[R - (k - i)]));
      }
    }
  }
} NSPACE;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  NSPACE.solve();
}
