#include <bits/stdc++.h>
using namespace std;
long nums[2000];
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) cin >> nums[i];
  long min = 1000000000;
  for (int i = 0; i < n; i++) {
    vector<long> list;
    int left = 0, right = 0;
    while (nums[left] < nums[i]) left++;
    right = left + 1;
    while (right < n) {
      vector<long> block;
      block.push_back(nums[left]);
      while (nums[right] >= nums[i] && right < n)
        block.push_back(nums[right++]);
      int totake = right - left + 1 - k;
      if (totake > 0) {
        sort(block.begin(), block.end());
        for (int j = 0; j < totake; j++) list.push_back(block[j]);
      }
      left = right + 1;
      right = left + 1;
    }
    if (list.size() >= q) {
      sort(list.begin(), list.end());
      if (list[q - 1] - list[0] < min) {
        min = list[q - 1] - list[0];
      }
    }
  }
  cout << min << endl;
}
