#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
int n, k, q;
long long a[2010];
bool solve(long long y, long long x) {
  int s = 0, t = 0, l = 0;
  for (int i = 0; i < n + 1; i++) {
    if (a[i] < y) {
      l += min(s - k + 1, t);
      s = t = 0;
    } else {
      if (a[i] <= x) {
        t++;
      }
      s++;
    }
  }
  return q <= l;
}
int main() {
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  a[n] = 0;
  long long m = 2 * INF;
  for (int i = 0; i < n; i++) {
    int y = a[i];
    long long st = 0, en = 2 * INF;
    while (st < en - 1) {
      long long mid = (st + en) / 2;
      if (solve(y, mid))
        en = mid;
      else
        st = mid;
    }
    printf("%d %d\n", y, en);
    m = min(m, en - y);
  }
  cout << (m) << endl;
}
