#include <bits/stdc++.h>
using namespace std;
const int N = 3505;
int n, m, k, a[N];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &m, &k);
    k = min(k, m - 1);
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    int ans = 0;
    for (int i = 0; i <= k; ++i) {
      int minn = 1e9;
      for (int j = 0; j <= m - k - 1; j++)
        minn = min(minn, max(a[i + j + 1], a[n + i - m + j + 1]));
      ans = max(ans, minn);
    }
    printf("%d\n", ans);
  }
  return 0;
}
