#include <bits/stdc++.h>
using namespace std;
long long n, m, p, q, t, i, j, k, x, y, z, c, s, d, l, r, l1, l2, lst, a, b, mx,
    cnt, cur, u, v, w;
const long long mod = 1000000007;
vector<pair<long long, long long> > nums;
long long is[1000001];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> l >> k;
  long long dp[k + 1][n];
  for (i = 0; i < k + 1; i++)
    for (j = 0; j < n; j++) dp[i][j] = 0;
  for (i = 0; i < n; i++) {
    cin >> p;
    nums.push_back({p, i});
  }
  long long ans = 0;
  long long segs = l / n;
  for (i = 0; i < l % n; i++) {
    is[i] = 1;
  }
  sort(nums.begin(), nums.end());
  for (j = 0; j < n; j++) {
    dp[1][j] = 1;
    ans = (ans + dp[1][j] * ((segs + (is[nums[j].second])) % mod) % mod) % mod;
  }
  for (i = 2; i <= min(k, segs + (n % l != 0)); i++) {
    long long sm = 0;
    for (j = 0; j < n; j++) {
      sm = (sm + dp[i - 1][j]) % mod;
      dp[i][j] = (dp[i][j] + sm) % mod;
    }
    ans = (ans + dp[i][n - 1] *
                     ((segs - i + 1 + (is[nums[n - 1].second])) % mod) % mod) %
          mod;
    for (j = n - 2; j >= 0; j--) {
      if (nums[j].first == nums[j + 1].first) {
        dp[i][j] = dp[i][j + 1];
      }
      ans = (ans +
             dp[i][j] * ((segs - i + 1 + (is[nums[j].second])) % mod) % mod) %
            mod;
    }
  }
  cout << ans;
}
