#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) {
    int n, m, k, ans, mn = INT_MAX, mx = 0;
    cin >> n >> m >> k;
    vector<int> v(n);
    for (int i = 0; i < n; ++i) cin >> v[i];
    k = min(k, m - 1);
    for (int x = 0; x <= k; ++x) {
      mn = INT_MAX;
      for (int y = 0; y <= m - 1 - k; ++y) {
        ans = max(v[x + y], v[n - (k - x) - (m - 1 - k - y) - 1]);
        mn = min(mn, ans);
      }
      mx = max(mx, mn);
    }
    cout << mx << "\n";
  }
  return 0;
}
