#include <bits/stdc++.h>
using namespace std;
int va[1234567];
const int mod = 1000000007;
const int M = 1000012;
vector<int> dp[M], sum[M];
int fd[M];
int vb[M];
map<int, int> mp;
int mul(int k, int t) {
  int ret = 1;
  while (t) {
    if (t & 1) ret = ret * 1ll * k % mod;
    t >>= 1;
    k = k * 1ll * k % mod;
  }
  return ret;
}
int main() {
  int n, k;
  long long l;
  scanf("%d%I64d%d", &n, &l, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &va[i]);
  if (n < l) {
    for (int i = 1; i <= n; i++) vb[i] = va[i];
    sort(va + 1, va + 1 + n);
    int now = 1;
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= k; j++) dp[i].push_back(0), sum[i].push_back(0);
    }
    for (int i = 1; i <= n; i++) {
      int t = i;
      while (i + 1 <= n && va[i + 1] == va[t]) i++;
      for (int j = 1; j <= k; j++) {
        dp[now][j] = (i - t + 1) * 1ll * (1 + dp[now][j - 1]) % mod;
        dp[now][j] =
            (dp[now][j] + (i - t + 1) * 1ll * sum[now - 1][j - 1]) % mod;
        sum[now][j] = dp[now][j] + sum[now - 1][j];
        if (sum[now][j] >= mod) sum[now][j] -= mod;
      }
      mp[va[t]] = now;
      now++;
    }
    now--;
    int ans = 0;
    if (l / n >= k) ans = sum[now][k] * 1ll * ((l / n - k + 1) % mod) % mod;
    for (int i = 1; i <= min(k * 1ll - 1, l / n); i++) {
      ans += sum[now][i];
      if (ans >= mod) ans -= mod;
    }
    for (int i = 1; i <= l % n; i++) {
      int t = mp[vb[i]];
      if (l / n >= k) {
        ans = ((ans + dp[t][k - 1] + 1) * 1ll + sum[t - 1][k - 1]) % mod;
      } else
        ans = ((ans + dp[t][l / n] + 1) * 1ll + sum[t - 1][l / n]) % mod;
    }
    printf("%d\n", ans);
  } else {
    printf("%d\n", l);
  }
  return 0;
}
