#include <bits/stdc++.h>
using namespace std;
class Fenwick {
  int *buf;
  int n;

 public:
  Fenwick(int _n) : n(_n) {
    buf = new int[n + 1];
    clear();
  }
  ~Fenwick() { delete[] buf; }
  void clear() { memset(buf, 0, (n + 1) * sizeof(int)); }
  int read(int idx) {
    int sum = 0;
    while (idx > 0) {
      sum += buf[idx];
      if (sum >= 1000000007) sum -= 1000000007;
      idx -= (idx & -idx);
    }
    return sum;
  }
  void update(int idx, int val) {
    while (idx <= n) {
      buf[idx] += val;
      if (buf[idx] >= 1000000007) buf[idx] -= 1000000007;
      idx += (idx & -idx);
    }
  }
};
int mas[1000100];
pair<int, int> buf[1000100];
long long l;
int n, k, m;
int calc(long long e, bool sum_all) {
  Fenwick f(m + 2);
  int step = 0;
  int idx = e % n;
  int ans = 0;
  int v = 0;
  for (long long i = e; i >= 0; i--, idx--) {
    int r = f.read(mas[idx]) + 1;
    if (r >= 1000000007) r -= 1000000007;
    buf[v++] = make_pair(mas[idx], r);
    if (sum_all || step == k - 1) {
      ans += r;
      if (ans >= 1000000007) ans -= 1000000007;
    }
    if (idx == 0) {
      step++;
      if (step >= k) break;
      idx = n;
      f.clear();
      for (int j = 0; j < v; j++) f.update(buf[j].first, buf[j].second);
      v = 0;
    }
  }
  return ans;
}
void Solve() {
  int i, j;
  scanf("%d %I64d %d", &n, &l, &k);
  vector<int> v;
  for (i = 0; i < n; i++) {
    scanf("%d", &(mas[i]));
    v.push_back(mas[i]);
  }
  sort((v).rbegin(), (v).rend());
  map<int, int> mp;
  m = 1;
  for (i = 0; i < v.size(); i++) {
    if (i && v[i] != v[i - 1]) m++;
    mp[v[i]] = m;
  }
  for (i = 0; i < n; i++) mas[i] = mp[mas[i]];
  int ans = calc(l - 1, true);
  long long nparts = (l + n - 1) / n;
  long long g = max(nparts - k, 0ll);
  if (g > 0) {
    int r2 = calc(n * k - 1, false);
    g %= 1000000007;
    ans += 1ll * r2 * g % 1000000007;
    ans %= 1000000007;
  }
  printf("%d", ans);
}
int main() {
  Solve();
  return 0;
}

### Prompt

Create a solution in cpp for the following problem:

While Duff was resting in the beach, she accidentally found a strange array b0, b1, ..., bl - 1 consisting of l positive integers. This array was strange because it was extremely long, but there was another (maybe shorter) array, a0, ..., an - 1 that b can be build from a with formula: bi = ai mod n where a mod b denoted the remainder of dividing a by b.

<image>

Duff is so curious, she wants to know the number of subsequences of b like bi1, bi2, ..., bix (0 ≤ i1 < i2 < ... < ix < l), such that: 

  * 1 ≤ x ≤ k
  * For each 1 ≤ j ≤ x - 1, <image>
  * For each 1 ≤ j ≤ x - 1, bij ≤ bij + 1. i.e this subsequence is non-decreasing. 



Since this number can be very large, she want to know it modulo 109 + 7.

Duff is not a programmer, and Malek is unavailable at the moment. So she asked for your help. Please tell her this number.

Input

The first line of input contains three integers, n, l and k (1 ≤ n, k, n × k ≤ 106 and 1 ≤ l ≤ 1018).

The second line contains n space separated integers, a0, a1, ..., an - 1 (1 ≤ ai ≤ 109 for each 0 ≤ i ≤ n - 1). 

Output

Print the answer modulo 1 000 000 007 in one line.

Examples

Input

3 5 3
5 9 1


Output

10


Input

5 10 3
1 2 3 4 5


Output

25

Note

In the first sample case, <image>. So all such sequences are: <image>, <image>, <image>, <image>, <image>, <image>, <image>, <image>, <image> and <image>.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
class Fenwick {
  int *buf;
  int n;

 public:
  Fenwick(int _n) : n(_n) {
    buf = new int[n + 1];
    clear();
  }
  ~Fenwick() { delete[] buf; }
  void clear() { memset(buf, 0, (n + 1) * sizeof(int)); }
  int read(int idx) {
    int sum = 0;
    while (idx > 0) {
      sum += buf[idx];
      if (sum >= 1000000007) sum -= 1000000007;
      idx -= (idx & -idx);
    }
    return sum;
  }
  void update(int idx, int val) {
    while (idx <= n) {
      buf[idx] += val;
      if (buf[idx] >= 1000000007) buf[idx] -= 1000000007;
      idx += (idx & -idx);
    }
  }
};
int mas[1000100];
pair<int, int> buf[1000100];
long long l;
int n, k, m;
int calc(long long e, bool sum_all) {
  Fenwick f(m + 2);
  int step = 0;
  int idx = e % n;
  int ans = 0;
  int v = 0;
  for (long long i = e; i >= 0; i--, idx--) {
    int r = f.read(mas[idx]) + 1;
    if (r >= 1000000007) r -= 1000000007;
    buf[v++] = make_pair(mas[idx], r);
    if (sum_all || step == k - 1) {
      ans += r;
      if (ans >= 1000000007) ans -= 1000000007;
    }
    if (idx == 0) {
      step++;
      if (step >= k) break;
      idx = n;
      f.clear();
      for (int j = 0; j < v; j++) f.update(buf[j].first, buf[j].second);
      v = 0;
    }
  }
  return ans;
}
void Solve() {
  int i, j;
  scanf("%d %I64d %d", &n, &l, &k);
  vector<int> v;
  for (i = 0; i < n; i++) {
    scanf("%d", &(mas[i]));
    v.push_back(mas[i]);
  }
  sort((v).rbegin(), (v).rend());
  map<int, int> mp;
  m = 1;
  for (i = 0; i < v.size(); i++) {
    if (i && v[i] != v[i - 1]) m++;
    mp[v[i]] = m;
  }
  for (i = 0; i < n; i++) mas[i] = mp[mas[i]];
  int ans = calc(l - 1, true);
  long long nparts = (l + n - 1) / n;
  long long g = max(nparts - k, 0ll);
  if (g > 0) {
    int r2 = calc(n * k - 1, false);
    g %= 1000000007;
    ans += 1ll * r2 * g % 1000000007;
    ans %= 1000000007;
  }
  printf("%d", ans);
}
int main() {
  Solve();
  return 0;
}

```