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