#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
ostream cnull(NULL);
const int INF = 1000 * 1000 * 1000;
const long long LINF = 1LL * INF * INF;
const int MAX = 3505;
const long double PI = acos(-1.);
const double EPS = 1e-6;
const long long MOD = INF + 7;
int a[MAX];
int n, m, k;
struct ST {
  int t[4 * MAX];
  void build(int v, int tl, int tr) {
    if (tl == tr) {
      t[v] = a[tl];
      return;
    }
    int tm = (tl + tr) / 2;
    build(v + v, tl, tm);
    build(v + v + 1, tm + 1, tr);
    t[v] = min(t[v + v], t[v + v + 1]);
  }
  int get(int v, int tl, int tr, int l, int r) {
    if (l == tl && r == tr) {
      return t[v];
    }
    int tm = (tl + tr) / 2;
    if (l >= tm + 1) {
      return get(v + v + 1, tm + 1, tr, l, r);
    }
    if (r <= tm) {
      return get(v + v, tl, tm, l, r);
    }
    return min(get(v + v, tl, tm, l, tm),
               get(v + v + 1, tm + 1, tr, tm + 1, r));
  }
} q;
void solve() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  q.build(1, 0, n - 1);
  m--;
  int best = -INF;
  if (k >= m) {
    for (int i = 0; i < n; ++i) {
      if (i <= m || (n - i - 1) <= m) best = max(best, a[i]);
    }
    cout << best << endl;
    return;
  }
  for (int l1 = 0; l1 < k + 1; ++l1) {
    int cur = INF;
    for (int i = 0; i < m - k + 1; ++i) {
      cur = min(cur, max(a[l1 + i], a[n - k + l1 - 1 - (m - k - i)]));
    }
    if (cur != INF) best = max(best, cur);
  }
  cout << best << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
