#include <bits/stdc++.h>
using namespace std;
signed main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> k >> m;
    k--;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    int ans = INT_MIN;
    if (k < m) m = k;
    for (int conv_up = 0; conv_up <= m; conv_up++) {
      int conv_down = m - conv_up;
      int cur = INT_MAX;
      for (int take_up = 0; take_up <= k - m; take_up++) {
        int take_down = k - m - take_up;
        cur = min(cur,
                  max(a[conv_up + take_up], a[n - conv_down - take_down - 1]));
      }
      ans = max(cur, ans);
    }
    cout << ans << "\n";
  }
}
