#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const long long mod = (long long)1e9 + 7;
const double eps = (double)1e-9;
const double pi = acos(-1.0);
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 3505;
int n, m, k, a[N], dp[N][N];
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n >> m >> k;
    k = min(k, m - 1);
    k = n - k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int len = n - m + 1;
    for (int i = 1; i <= n - len + 1; i++)
      dp[i][i + len - 1] = max(a[i], a[i + len - 1]);
    for (int l = len + 1; l <= n; l++) {
      for (int i = 1; i <= n - l + 1; i++) {
        int j = i + l - 1;
        dp[i][j] = min(dp[i + 1][j], dp[i][j - 1]);
      }
    }
    int ans = 0;
    for (int i = 1; i <= n - k + 1; i++) {
      int j = i + k - 1;
      ans = max(ans, dp[i][j]);
    }
    cout << ans << "\n";
  }
  return 0;
}
