#include <bits/stdc++.h>
using namespace std;
long long p = 1000000007;
vector<long long> kai;
vector<long long> inv_kai;
long long root(long long x, vector<long long>& pa) {
  if (pa[x] == -1) {
    return x;
  }
  long long ans = root(pa[x], pa);
  pa[x] = ans;
  return ans;
}
bool mar(long long x, long long y, vector<long long>& pa) {
  x = root(x, pa);
  y = root(y, pa);
  if (x != y) {
    pa[x] = y;
  }
  return (x != y);
}
long long gcd(long long x, long long y) {
  if (x < y) {
    return gcd(y, x);
  }
  if (y == 0) {
    return x;
  }
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) {
  x = abs(x);
  y = abs(y);
  return x * (y / gcd(x, y));
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
void make_kai(long long max_kai, long long p) {
  kai = vector<long long>(max_kai, 1);
  inv_kai = kai;
  for (long long i = 0; i < max_kai - 1; i++) {
    kai[i + 1] = kai[i] * (i + 1);
    kai[i + 1] %= p;
    inv_kai[i + 1] = modinv(kai[i + 1], p);
  }
}
long long com(long long n, long long r) {
  if ((n < 0) || (r < 0) || (r > n)) {
    return 0;
  }
  long long ans = (kai[n] * inv_kai[r]) % p;
  return (ans * inv_kai[n - r]) % p;
}
vector<long long> uni(vector<long long> x) {
  if (x.size() == 0) {
    return x;
  }
  sort(x.begin(), x.end());
  long long n = x.size();
  vector<long long> ans(1, x[0]);
  for (long long j = 1; j < n; j++) {
    if (x[j - 1] != x[j]) {
      ans.push_back(x[j]);
    }
  }
  x = ans;
  return x;
}
vector<long long> dijk(vector<vector<pair<long long, long long>>>& way,
                       long long st, long long inf) {
  long long n = way.size();
  vector<long long> dist(n, inf);
  dist[st] = 0;
  priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
                 greater<pair<long long, long long>>>
      pq;
  pq.push(make_pair(0, st));
  vector<bool> is_checked(n, false);
  while (!pq.empty()) {
    pair<long long, long long> x = pq.top();
    pq.pop();
    long long pot = x.second;
    if (!is_checked[pot]) {
      is_checked[pot] = true;
      for (auto y : way[pot]) {
        long long nex_dist = x.first + y.second;
        long long nex_pot = y.first;
        if (dist[nex_pot] > nex_dist) {
          dist[nex_pot] = nex_dist;
          pq.push(make_pair(nex_dist, y.first));
        }
      }
    }
  }
  return dist;
}
void make_tree(vector<vector<long long>>& chi, vector<long long>& par,
               long long n) {
  vector<vector<pair<long long, long long>>> way(n);
  for (long long i = 0; i < n - 1; i++) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    way[a].push_back(make_pair(b, 1));
    way[b].push_back(make_pair(a, 1));
  }
  vector<long long> dist = dijk(way, 0, n + 1);
  par = vector<long long>(n, -1);
  chi = vector<vector<long long>>(n);
  for (long long i = 0; i < n; i++) {
    for (auto nex : way[i]) {
      long long pot = nex.first;
      if (dist[pot] > dist[i]) {
        chi[i].push_back(pot);
      } else {
        par[i] = pot;
      }
    }
  }
}
void pri(vector<long long>& v) {
  if (v.size() == 0) {
    return;
  }
  cout << v[0];
  for (long long i = 0; i < v.size() - 1; i++) {
    cout << " " << v[i + 1];
  }
  cout << "\n";
  return;
}
long long modpow(long long a, long long n, long long p) {
  if (n == 0) {
    return 1;
  }
  long long m = n / 2;
  long long x = modpow(a, n / 2, p);
  x *= x;
  x %= p;
  if (n % 2 == 1) {
    x *= a;
    x %= p;
  }
  return x;
}
vector<vector<long long>> ans;
void solve(long long i, string& s) {
  if (ans[0][i] == -1) {
    if (s[i] == 'R') {
      if (s[i + 1] == 'L') {
        ans[0][i] = i;
        ans[1][i] = i + 1;
        ans[0][i + 1] = i + 1;
        ans[1][i + 1] = i;
      } else {
        solve(i + 1, s);
        ans[0][i] = ans[1][i + 1];
        ans[1][i] = ans[0][i + 1];
      }
    } else {
      solve(i - 1, s);
      ans[0][i] = ans[1][i - 1];
      ans[1][i] = ans[0][i - 1];
    }
  }
}
signed main() {
  long long n, k, q;
  cin >> n >> k >> q;
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a[i] = make_pair(x, i);
  }
  vector<pair<long long, long long>> b = a;
  sort(b.begin(), b.end());
  long long ans = 2 * p;
  for (long long i = 0; i < n; i++) {
    vector<long long> st = {-1};
    for (long long j = 0; j < n; j++) {
      if (a[j] < b[i]) {
        st.push_back(j);
      }
    }
    st.push_back(n);
    sort(st.begin(), st.end());
    long long ng = i - 1;
    long long ok = n;
    while (ok - ng > 1) {
      long long mid = (ok + ng) / 2;
      long long sz = st.size() - 1;
      long long cnt = 0;
      for (long long j = 0; j < sz; j++) {
        long long t1 = st[j];
        long long t2 = st[j + 1];
        long long cnt2 = 0;
        for (long long l = t1 + 1; l < t2; l++) {
          if (a[l] <= b[mid]) {
            cnt2++;
          }
        }
        cnt += min(cnt2, t2 - t1 - k);
      }
      if (cnt < q) {
        ng = mid;
      } else {
        ok = mid;
      }
    }
    if (ok != n) {
      ans = min(ans, b[ok].first - b[i].first);
    }
  }
  cout << ans << "\n";
  return 0;
}
