#include <bits/stdc++.h>
using namespace std;
void Print(int _x) { printf("%d\n", _x); }
void Print(long long _x) { printf("%lld\n", _x); }
template <typename T>
void Print(T _a[], int _s, int _t) {
  for (int i = _s; i <= _t; i++) cout << _a[i] << " ";
  cout << endl;
}
struct InputReader {
  static const int bs = 100000;
  char buf[bs];
  int p;
  inline InputReader() : p(bs) {}
  inline void Flush() {
    p = 0;
    fread(buf, 1, bs, stdin);
  }
  inline char C() {
    if (p >= bs) Flush();
    return buf[p++];
  }
  int Getnum() {
    char ch = C();
    while (ch < '0' || ch > '9') ch = C();
    return (int)(ch - '0');
  }
  inline int operator()() {
    int ans = 0;
    char ch = C();
    int fu = 1;
    while (ch < '0' || ch > '9') {
      if (ch == '-') fu = -1;
      ch = C();
    }
    while (ch >= '0' && ch <= '9') {
      ans *= 10;
      ans += ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  long long Readll() {
    long long ans = 0LL;
    long long fu = 1;
    char ch = C();
    while (ch < '0' || ch > '9') {
      if (ch == '-') fu = -1;
      ch = C();
    }
    while (ch >= '0' && ch <= '9') {
      ans *= 10LL;
      ans += ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  inline void Readstring(string &x) {
    x.clear();
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch)) ch = C();
    while (isdigit(ch) || isalpha(ch)) {
      x += ch;
      ch = C();
    }
  }
  inline int Readchstr(char c[]) {
    int p = 0;
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch)) ch = C();
    while (isdigit(ch) || isalpha(ch)) {
      c[p] = ch;
      ch = C();
      p++;
    }
    c[p] = '\0';
    return p;
  }
  inline void Readalpha(char &c) {
    c = C();
    while (!isalpha(c)) c = C();
  }
  inline void Specialread(char &c) {
    c = C();
    while (c != 'o' && c != 'x' && c != '?') c = C();
  }
} In;
inline void Read(int &x) { x = In(); }
inline void Read(int &x, int &y) {
  x = In();
  y = In();
}
inline void Read(int &x1, int &x2, int &x3) {
  x1 = In();
  x2 = In();
  x3 = In();
}
inline void Read(int &x1, int &x2, int &x3, int &x4) {
  x1 = In();
  x2 = In();
  x3 = In();
  x4 = In();
}
inline void Read(long long &x) { x = In.Readll(); }
inline void Read(long long &x, long long &y) {
  x = In.Readll();
  y = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3, long long &x4) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
  x4 = In.Readll();
}
clock_t _starttime, _endtime;
inline void FILEIO() {}
inline void END() { exit(0); }
int dx[] = {0, -1, 0, 1};
int dy[] = {1, 0, -1, 0};
int n, k, q;
int a[2010];
bool cannot[2010];
int st, lst = -(0x3f3f3f3f);
vector<int> v;
int main() {
  FILEIO();
  Read(n, k, q);
  for (register int(i) = 1; (i) <= (n); (i)++) Read(a[i]);
  int ans = (0x3f3f3f3f);
  for (register int(i) = 1; (i) <= (n); (i)++) {
    v.clear();
    st = a[i];
    for (register int(j) = 1; (j) <= (n); (j)++)
      if (a[j] < st && a[j] >= lst) {
        for (register int(l) = (max(j - k + 1, 1)); (l) <= (min(j + k - 1, n));
             (l)++)
          cannot[l] = 1;
      }
    lst = st;
    if (cannot[i]) continue;
    for (register int(j) = 1; (j) <= (n); (j)++)
      if (!cannot[j]) v.push_back(a[j]);
    if (v.size() < q) continue;
    sort(v.begin(), v.end());
    if (ans > v[q - 1] - st) ans = v[q - 1] - st;
  }
  printf("%d\n", ans);
  END();
}
