#include <bits/stdc++.h>
using namespace std;
int l[2005];
set<int> bad;
int n, k, q;
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d", &l[i]);
    bad.insert(l[i]);
  }
  bad.insert(0);
  int ret = 1 << 30;
  for (int thresh : bad) {
    vector<int> all;
    for (int i = 0; i < n;) {
      if (l[i] <= thresh) {
        i++;
        continue;
      }
      int j = i + 1;
      while (j < n && l[j] > thresh) j++;
      vector<int> inside;
      for (int a = i; a < j; a++) {
        inside.push_back(l[a]);
      }
      sort(inside.begin(), inside.end());
      for (int a = 0; a <= inside.size() - k; a++) {
        all.push_back(inside[a]);
      }
      i = j;
    }
    sort(all.begin(), all.end());
    if (all.size() >= q) {
      ret = min(ret, all[q - 1] - all[0]);
    } else {
      break;
    }
  }
  printf("%d\n", ret);
}
