#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1e3 + 7;
int n, k, Q;
int a[N], b[N], c[N], q[N], head, tail, tot;
map<int, int> id;
bool chk(int v) {
  int x;
  for (int i = 1; i <= tot; i++)
    if (c[i] == v) {
      x = i;
      break;
    }
  head = 1, tail = 0;
  for (int j = max(x - k + 1, 1); j <= min(x + k - 1, tot); j++) {
    while (head <= tail && q[head] < j - k + 1) head++;
    while (head <= tail && c[j] <= c[q[tail]]) tail--;
    q[++tail] = j;
    if (c[q[head]] == v) return 1;
  }
  return 0;
}
void del(int v) {
  int pos;
  for (int i = 1; i <= tot; i++)
    if (c[i] == v) {
      pos = i;
      break;
    }
  tot--;
  for (int i = pos; i <= tot; i++) c[i] = c[i + 1];
}
int main() {
  scanf("%d%d%d", &n, &k, &Q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = a[i], id[a[i]] = i;
  sort(b + 1, b + n + 1);
  int ans = 0x7fffffff;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) c[j] = a[j];
    tot = n;
    int x = b[i];
    if (!chk(x)) continue;
    del(x);
    int cnt = 1, mx = 0;
    for (int j = i + 1; j <= n; j++) {
      if (cnt == Q) break;
      if (chk(b[j])) del(b[j]), cnt++, mx = max(mx, b[j]);
    }
    if (cnt < Q) continue;
    ans = min(ans, mx - b[i]);
  }
  printf("%d", ans);
}
