#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[500005], id[500005];
bool cmp(int x, int y) { return a[x] > a[y]; }
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n >> m >> k;
    int mx = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      mx = max(mx, a[i]);
    }
    k = min(k, m - 1);
    int ans = 0;
    for (int i = 0; i <= k; i++) {
      int r = k - i, mn = mx;
      for (int j = 0; j <= m - 1 - k; j++) {
        int t = m - 1 - k - j;
        int x = max(a[i + j + 1], a[n - r - t]);
        mn = min(mn, x);
      }
      ans = max(ans, mn);
    }
    printf("%d\n", ans);
  }
  return 0;
}
