#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
int64_t max1(vector<int64_t> &arr) {
  int64_t j = arr[0];
  for (int i = 1; i < (int)arr.size(); ++i) j = max(j, arr[i]);
  return j;
}
int64_t min1(vector<int64_t> &arr) {
  int64_t j = arr[0];
  for (int i = 1; i < (int)arr.size(); ++i) j = min(j, arr[i]);
  return j;
}
bool base_case(int64_t n, int64_t m, int64_t k, vector<int64_t> &arr) {
  if (m == 1) {
    cout << max(arr[0], arr[n - 1]) << "\n";
    return true;
  }
  if (k >= m - 1) {
    int64_t ans = -1;
    for (int i = 0; i <= m - 1; ++i) {
      int64_t x1 = i;
      int64_t y1 = (arr.size()) - (m - 1 - i) - 1;
      ans = max({ans, arr[x1], arr[y1]});
    }
    cout << ans << "\n";
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int64_t i, j, k, n, m, x1, y1, x2, y2;
    cin >> n >> m >> k;
    vector<int64_t> arr(n);
    for (i = 0; i < n; ++i) cin >> arr[i];
    if (base_case(n, m, k, arr)) continue;
    int64_t ans = -1;
    for (i = 0; i <= k; ++i) {
      x1 = i;
      y1 = n - (k - i) - 1;
      int64_t temp = 1E10;
      for (j = 0; j <= m - k - 1; ++j) {
        x2 = j + x1;
        y2 = (y1 + 1) - (m - k - 1 - j) - 1;
        temp = min({temp, max(arr[x2], arr[y2])});
      }
      ans = max(ans, temp);
    }
    cout << ans << "\n";
  }
  return 0;
}
