#include <bits/stdc++.h>
using namespace std;
const long long mod = 10000;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long i, j, k, n, m, t, x, z, head, tail, b[500005], c[105],
    y = 0, o, mid, ans, sum = 0, flag, maxx = 0, max1, mark, a[500005];
set<long long> s;
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    for (i = 1; i <= n; i++) cin >> a[i];
    k = min(k, m - 1);
    ans = -1;
    long long len1 = n - k;
    long long len2 = len1 - (m - 1 - k);
    for (i = 1; i <= k + 1; ++i) {
      sum = 0x3f3f3f3f;
      for (j = i; j <= i + len1 - len2; ++j)
        sum = min(sum, max(a[j], a[j + len2 - 1]));
      ans = max(ans, sum);
    }
    cout << ans << endl;
  }
  return 0;
}
