#include <bits/stdc++.h>
using namespace std;
long long maxi(long long &a, long long b) {
  if (b > a) {
    a = b;
    return 1;
  }
  return 0;
}
long long mini(long long &a, long long b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long maxi(long double &a, long double b) {
  if (b > a) {
    a = b;
    return 1;
  }
  return 0;
}
long long mini(long double &a, long double b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> a(n);
    for (long long &now : a) {
      cin >> now;
    }
    long long good_choose = min(k, m - 1);
    long long ans = -1e18;
    for (long long x = 0; x <= good_choose; x++) {
      long long bad_choose = m - 1 - good_choose;
      long long now_ans = 1e18;
      for (long long y = 0; y <= bad_choose; y++) {
        mini(now_ans,
             max(a[x + y], a[n - 1 - (good_choose - x) - (bad_choose - y)]));
      }
      maxi(ans, now_ans);
    }
    cout << ans << "\n";
  }
  return 0;
}
