#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
pair<int, int> a[1234567];
inline int work(const int &n, const long long &l, const int &kk) {
  int i, j, k;
  int m = min((long long)kk, l / n);
  vector<vector<int> > f(n + 11, vector<int>(m + 11));
  sort(a, a + n);
  for (i = 0; i < (n); i++) f[i][1] = 1;
  for (i = (2); i <= (m); i++) {
    k = 0;
    int sum = 0;
    for (j = 0; j < (n); j++) {
      while (k < n && a[k].first == a[j].first) {
        sum += f[k][i - 1];
        sum %= MOD;
        k++;
      }
      f[j][i] += sum;
    }
  }
  int q = l % n;
  if ((q != 0) && (kk > l / n)) {
    i = m + 1;
    k = 0;
    int sum = 0;
    for (j = 0; j < (n); j++) {
      while (k < n && a[k].first == a[j].first) {
        sum += f[k][i - 1];
        sum %= MOD;
        k++;
      }
      if (a[j].second >= q) continue;
      f[j][i] += sum;
    }
  }
  int ans = 0;
  long long w = l / n;
  for (i = (1); i <= (m + 1); i++) {
    for (j = 0; j < (n); j++) {
      if (f[j][i]) {
        long long multi = w - i + 1;
        if (a[j].second < q) multi++;
        ans += ((multi % MOD) * f[j][i]) % MOD;
        ans %= MOD;
      }
    }
  }
  return ans;
}
int main() {
  int n, k;
  long long l;
  int i;
  cin >> n >> l >> k;
  for (i = 0; i < (n); i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  cout << work(n, l, k) << endl;
  return 0;
}
