#include <bits/stdc++.h>
using namespace std;
const int N = 2000;
int n;
int k;
int q;
int Maxn;
int a[N + 1];
int b[N + 1];
int tot;
struct Node {
  int l;
  int r;
  int x;
} S[N * N + 1];
bool operator<(Node a, Node b) { return a.x < b.x; }
int main() {
  cin >> n >> k >> q;
  Maxn = n - k + 1;
  for (int i = 1; i <= n; i++) cin >> a[i], b[i] = a[i];
  sort(b + 1, b + 1 + n);
  for (int i = 1; i <= Maxn; i++)
    for (int j = i + q - 1; j <= Maxn; j++)
      S[++tot].x = b[j] - b[i], S[tot].l = i, S[tot].r = j;
  sort(S + 1, S + 1 + tot);
  for (int i = 1; i <= tot; i++) {
    int l = 1;
    int s = 0;
    int sum = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] < b[S[i].l]) {
        sum += max(0, min(s, j - l - k + 1));
        l = n + 1;
        s = 0;
      } else
        l = min(j, l), s += (a[j] <= b[S[i].r]);
      if (sum + n - l + 1 < q) {
        sum = -1e9;
        break;
      }
    }
    sum += max(0, min(s, n - l - k + 2));
    if (sum >= q) {
      cout << S[i].x;
      break;
    }
  }
  return 0;
}
