#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, m, k;
    cin >> n >> m >> k;
    int a[n];
    for (int j = 0; j < n; ++j) {
      cin >> a[j];
    }
    int ans = 0;
    --m;
    if (m - k < 0) {
      for (int k_beg = 0; k_beg <= m; ++k_beg) {
        int k_end = m - k_beg;
        ans = max(ans, max(a[k_end], a[n - k_beg - 1]));
      }
      cout << ans << endl;
      continue;
    }
    for (int k_beg = 0; k_beg <= k; ++k_beg) {
      int k_end = k - k_beg;
      int mn = 1001 * 1001 * 1001;
      for (int m_beg = 0; m_beg <= max(m - k, 0); ++m_beg) {
        int m_end = m - k - m_beg;
        mn = min(mn, max(a[k_end + m_end], a[n - k_beg - m_beg - 1]));
      }
      ans = max(ans, mn);
    }
    cout << ans << endl;
  }
  return 0;
}
