#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    int a[n + 1];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    int max1 = INT_MIN;
    if ((m - 1) >= k) {
      for (int i = 0; i <= k; i++) {
        int max2 = INT_MAX;
        for (int j = 0; j <= (m - 1 - k); j++) {
          max2 = min(max2, max(a[j + i + 1], a[n - (m - 1 - j) + i]));
        }
        max1 = max(max2, max1);
      }
      cout << max1 << endl;
    } else {
      int t1 = INT_MIN;
      for (int i = 1; i <= m; i++) {
        t1 = max(t1, a[i]);
      }
      int t2 = INT_MIN;
      for (int i = n; i > (n - m); i--) {
        t2 = max(t2, a[i]);
      }
      t1 = max(t2, t1);
      cout << t1 << endl;
    }
  }
  return 0;
}
