#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int N, K, Q;
pair<int, int> tree[maxn << 2];
int a[maxn], b[maxn];
void build(int cur, int l, int r) {
  if (l == r) {
    tree[cur] = pair<int, int>(b[l], l);
    return;
  }
  build(cur << 1, l, (l + r) / 2);
  build(cur << 1 | 1, (l + r) / 2 + 1, r);
  tree[cur] = min(tree[cur << 1], tree[cur << 1 | 1]);
}
pair<int, int> query(int cur, int l, int r, int a, int b) {
  if (a <= l && r <= b) {
    return tree[cur];
  }
  int mid = (l + r) / 2;
  pair<int, int> ans;
  ans.first = 0x7fffffff;
  if (a <= mid) ans = min(ans, query(cur << 1, l, mid, a, b));
  if (b > mid) ans = min(ans, query(cur << 1 | 1, mid + 1, r, a, b));
  return ans;
}
int main() {
  cin >> N >> K >> Q;
  K--;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  int mina, maxa;
  mina = 0x7fffffff;
  maxa = 0;
  for (int i = 1; i <= Q; i++) {
    build(1, 1, N);
    int tmp_diff = 0x7fffffff, tmp_choice = 0;
    int tmp_mx = maxa, tmp_min = mina;
    for (int j = 1; j + K <= N; j++) {
      pair<int, int> tmp = query(1, 1, N, j, j + K);
      int tmp_mina = tmp.first;
      int ch = tmp.second;
      if (max(tmp_mina, maxa) - min(mina, tmp_mina) < tmp_diff) {
        tmp_diff = max(tmp_mina, maxa) - min(mina, tmp_mina);
        tmp_mx = max(tmp_mx, tmp_mina);
        tmp_min = min(tmp_min, tmp_mina);
        tmp_choice = ch;
      }
    }
    maxa = tmp_mx;
    mina = tmp_min;
    int tot = 0;
    for (int i = 1; i <= N; i++) {
      if (i != tmp_choice) b[++tot] = a[i];
    }
    N = tot;
    for (int i = 1; i <= N; i++) a[i] = b[i];
  }
  cout << maxa - mina << endl;
  return 0;
}
