#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > matmul(vector<vector<long long> > &a,
                                  vector<vector<long long> > &b) {
  int i, j, k, n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      long long temp = 0;
      for (k = 0; k < n; k++)
        temp = (temp + a[i][k] * b[k][j]) % (1000000007LL);
      ans[i][j] = temp;
    }
  return ans;
}
vector<vector<long long> > matpwr(vector<vector<long long> > &a, long long p) {
  int n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (int i = 0; i < n; i++) ans[i][i] = 1;
  while (p) {
    if (p & 1) ans = matmul(ans, a);
    a = matmul(a, a);
    p >>= 1;
  }
  return ans;
}
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long invMod(long long n, long long mod = (1000000007LL)) {
  return pwr(n, mod - 2);
}
int n, k, arr[1000002];
long long l, cnt[1000002], DP[2][1000005], ps[1000002];
map<int, int> compress;
int main() {
  scanf("%d%I64d%d", &n, &l, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    compress[arr[i]];
  }
  int cc = 0;
  for (map<int, int>::iterator it = compress.begin(); it != compress.end();
       it++)
    it->second = ++cc;
  for (int i = 1; i <= n; i++) {
    arr[i] = compress[arr[i]];
    cnt[arr[i]]++;
  }
  long long blocks = l / n;
  long long ans = 0;
  for (int i = 1; i <= cc; i++) DP[1][i] = cnt[i];
  ans = (ans + l) % (1000000007LL);
  int rem = l % n;
  for (int len = 2; len <= min(1LL * k, blocks); len++) {
    int curr = (len & 1), prev = 1 - curr;
    for (int i = 1; i <= cc; i++) {
      ps[i] = (ps[i - 1] + DP[prev][i]) % (1000000007LL);
      DP[curr][i] = (ps[i] * cnt[i]) % (1000000007LL);
    }
    for (int i = 1; i <= cc; i++)
      ans = (ans + DP[curr][i] * ((blocks - len + 1) % (1000000007LL))) %
            (1000000007LL);
    for (int i = 1; i <= rem; i++) ans = (ans + ps[arr[i]]) % (1000000007LL);
  }
  if (1LL * k > blocks) {
    for (int i = 1; i <= cc; i++)
      ps[i] = (ps[i - 1] + DP[(blocks)&1][i]) % (1000000007LL);
    for (int i = 1; i <= rem; i++) ans = (ans + ps[arr[i]]) % (1000000007LL);
  }
  printf("%I64d", ans);
  return 0;
}
