#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 = 1005;
int n, k, q, a[N], ar[N], arr[N];
int main() {
  cin >> n >> k >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = (int)2e9;
  for (int i = 1; i <= n; i++) {
    int m = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] < a[i]) continue;
      int ptr = j - 1, sz = 0;
      while (ptr < n && a[ptr + 1] >= a[i]) ar[++sz] = a[++ptr];
      sort(ar + 1, ar + 1 + sz);
      for (int it = 1; it <= sz - k + 1; it++) arr[++m] = ar[it];
      j = ptr;
    }
    sort(arr + 1, arr + 1 + m);
    if (m >= q) ans = min(ans, arr[q] - a[i]);
  }
  cout << ans;
  return 0;
}
