#include <bits/stdc++.h>
#pragma gcc optimize("03")
using namespace std;
const int N = 3e5 + 5;
int t, n, m, k, arr[N], rem;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 0; i < n; ++i) scanf("%d", arr + i);
    k = min(k, m - 1);
    rem = m - 1 - k;
    int mx = 0;
    for (int takel = 0; takel <= k; ++takel) {
      int taker = k - takel;
      int mn = 1e9 + 5;
      int sl = takel, sr = n - 1 - taker;
      for (int l = sl; l < n; ++l) {
        if (l - sl > rem) break;
        int rrem = rem - (l - sl);
        int r = sr - rrem;
        int x = max(arr[l], arr[r]);
        mn = min(mn, x);
      }
      mx = max(mx, mn);
    }
    printf("%d\n", mx);
  }
  return 0;
}
