#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
const int INF = 1e9;
int a[N];
int test(int st, int en, int m) {
  int arr = INF;
  for (int i = 0; i <= m; i++) {
    arr = min(arr, max(a[st + i], a[en - m + i]));
  }
  return arr;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int arr = 0;
    int n, m, k;
    cin >> n >> m >> k;
    k = min(k, m - 1);
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= k + 1; i++) {
      int st = i;
      int en = n - k + i - 1;
      arr = max(arr, test(st, en, m - 1 - k));
    }
    cout << arr << '\n';
  }
}
