#include <bits/stdc++.h>
using namespace std;
long long int n = 0, m = 0, ans = 0, sum = 0, cnt = 0, tmp = 0, ma = 0, mi = 0;
string s;
bool flag, ok;
long long int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1};
long long int ddx[9] = {1, -1, 0, 0, 1, 1, -1, -1, 0},
              ddy[9] = {0, 0, 1, -1, 1, -1, 1, -1, 0};
long long int x[2222];
int main(void) {
  priority_queue<long long int, vector<long long int>, greater<long long int>>
      pq1, pq2;
  vector<long long int> a[2222], b;
  long long int k, q, ind, ri, le;
  cin >> n >> k >> q;
  for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
    cin >> x[i];
  }
  for (long long int i = (long long int)(0); i < (long long int)(n - k + 1);
       i++) {
    mi = 5555555555555555555;
    for (long long int j = (long long int)(0); j < (long long int)(k); j++) {
      if (mi >= x[i + j]) {
        mi = x[i + j];
        ind = i + j;
      }
    }
    b.push_back(ind);
  }
  ans = 5555555555555555555;
  for (long long int j = (long long int)(0); j < (long long int)(b.size());
       j++) {
    while (!pq2.empty()) pq2.pop();
    m = b[j];
    for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
      if (i == m) continue;
      a[j].push_back(x[i]);
    }
    le = ri = 0;
    while (1) {
      if (le + (k - 1) >= a[j].size()) break;
      ok = true;
      for (long long int i = (long long int)(0); i < (long long int)(k); i++) {
        if (a[j][le + i] < x[m]) {
          ok = false;
          tmp = le + i;
        }
      }
      if (!ok) {
        le = tmp + 1;
        continue;
      }
      while (!pq1.empty()) pq1.pop();
      for (long long int i = (long long int)(0); i < (long long int)(k - 1);
           i++) {
        pq1.push(a[j][le + i]);
      }
      ri = le + k - 1;
      while (ri < a[j].size()) {
        if (a[j][ri] < x[m]) {
          le = ri + 1;
          break;
        }
        pq1.push(a[j][ri]);
        pq2.push(pq1.top());
        pq1.pop();
        ri++;
      }
      le = ri + 1;
    }
    if (pq2.empty()) continue;
    if (pq2.size() < q - 1) continue;
    for (long long int i = (long long int)(0); i < (long long int)(q - 2); i++)
      pq2.pop();
    ans = min(ans, pq2.top() - x[m]);
  }
  cout << ans << endl;
  return 0;
}
