#include <bits/stdc++.h>
using namespace std;
int sum[1000000 + 5];
int A[1000000 + 5];
int dp[1000000 + 5][3];
int sdp[1000000 + 5][3];
int main() {
  int N, K;
  signed long long int L;
  map<signed long long int, int> mp;
  cin >> N >> L >> K;
  vector<int> v;
  for (int i = 1; i <= N; ++i) {
    scanf("%d", &A[i]);
    v.push_back(A[i]);
  }
  sort(v.begin(), v.end());
  for (int i = 1; i <= N; ++i) {
    mp[v[i - 1]] = i;
  }
  for (int i = 1; i <= N; ++i) {
    A[i] = mp[A[i]];
    sum[i] = 1;
  }
  signed long long int ans = 0;
  for (int k = 1; k <= K; ++k) {
    for (int i = 1; i <= N; ++i) {
      dp[i][k & 1] = sum[A[i]];
      sdp[i][k & 1] = sdp[i][(k - 1) & 1] + dp[i][k & 1];
      if (sdp[i][k & 1] >= 1000000007) {
        sdp[i][k & 1] -= 1000000007;
      }
      if ((k - 1) * N + i <= L) {
        ans += sdp[i][k & 1];
        if (ans >= 1000000007) {
          ans -= 1000000007;
        }
      }
      signed long long int used = N * (K - 1) + i;
      signed long long int rem = (L - used) / N;
      if (rem > 0) {
        rem %= 1000000007;
        ans += (dp[i][k & 1] * rem) % 1000000007;
      }
      if (ans >= 1000000007) {
        ans -= 1000000007;
      }
    }
    for (int i = 1; i <= N; ++i) {
      sum[i] = 0;
    }
    for (int i = 1; i <= N; ++i) {
      sum[A[i]] += dp[i][k & 1];
      if (sum[A[i]] >= 1000000007) {
        sum[A[i]] -= 1000000007;
      }
    }
    for (int i = 1; i <= N; ++i) {
      sum[i] += sum[i - 1];
      if (sum[i] >= 1000000007) {
        sum[i] -= 1000000007;
      }
    }
  }
  cout << ans;
}
