#include <bits/stdc++.h>
using namespace std;
signed main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  int tt;
  cin >> tt;
  for (tt; tt > 0; tt--) {
    int n, m, k, ans = 0;
    cin >> n >> m >> k;
    k = min(k, m - 1);
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int l = 0; l <= k; l++) {
      int r = k - l, mini = 1e9 + 1;
      for (int j = 0; j <= m - 1 - k; j++)
        mini = min(mini, max(a[l + j], a[n - 1 - r - (m - 1 - k - j)]));
      ans = max(ans, mini);
    }
    cout << ans << "\n";
  }
  return 0;
}
