#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
int a[300005];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    memset(a, 0, sizeof(a));
    int y = 0;
    cin >> n >> m >> k;
    for (int i = 0; i < n; ++i) cin >> a[i];
    k = min(k, m - 1);
    for (int i = 0; i <= k; ++i) {
      int mn = inf;
      int l = i, r = n - k + i - 1;
      int q = m - k - 1;
      for (int j = 0; j <= q; ++j) {
        int o = a[l + j];
        int oo = a[r - (q - j)];
        o = max(o, oo);
        mn = min(mn, o);
      }
      if (mn < inf) y = max(y, mn);
    }
    cout << y << endl;
  }
  return 0;
}
