#include <bits/stdc++.h>
using namespace std;
long long int combi(long long int n, long long int k) {
  long long int ans = 1;
  k = k > n - k ? n - k : k;
  long long int j = 1;
  for (; j <= k; j++, n--) {
    if (n % j == 0) {
      ans *= n / j;
    } else if (ans % j == 0) {
      ans = ans / j * n;
    } else {
      ans = (ans * n) / j;
    }
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int findlcm(vector<long long int> arr, long long int n) {
  long long int ans = arr[0];
  for (long long int i = 1; i < n; i++)
    ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m, k;
    cin >> n >> m >> k;
    vector<long long int> arr;
    long long int x;
    for (long long int i = 0; i < n; i++) {
      cin >> x;
      arr.push_back(x);
    }
    k = min(k, m - 1);
    set<long long int> ans;
    set<long long int> num;
    for (long long int x = 0; x <= k; x++) {
      for (long long int y = 0; y <= m - 1 - k; y++) {
        num.insert(max(arr[x + y], arr[x + y + n - m]));
      }
      ans.insert(*(num.begin()));
      num.clear();
    }
    cout << *(ans.rbegin()) << "\n";
  }
  return 0;
}
