#include <bits/stdc++.h>
using namespace std;
int t, n, m, k;
int rs;
int a[100010];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    if (k >= m) k = m - 1;
    rs = 0;
    for (int i = 0; i <= k; i++) {
      int left = i + 1;
      int right = n - k + i;
      int r = m - k - 1;
      int v1 = 2e9;
      for (int j = 0; j <= r; j++) {
        int l2 = left + j;
        int r2 = right - r + j;
        v1 = min(max(a[l2], a[r2]), v1);
      }
      rs = max(rs, v1);
    }
    cout << rs << '\n';
  }
  return 0;
}
