#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int T;
  cin >> T;
  cin.ignore();
  for (int t = 0; t < T; ++t) {
    int n, m, k;
    cin >> n >> m >> k;
    cin.ignore();
    vector<int> values(n);
    for (auto& v : values) {
      cin >> v;
      cin.ignore();
    }
    --m;
    int u = max(0, m - k);
    int s = n - m + u;
    int ans = 0;
    for (int i = 0; i <= n - s; ++i) {
      int ans2 = numeric_limits<int>::max();
      for (int j = 0; j <= u; ++j) {
        ans2 = min(ans2, max(values[i + j], values[i + s - 1 + j - u]));
      }
      ans = max(ans, ans2);
    }
    cout << ans << endl;
  }
  return 0;
}
