#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[1001000];
int ps[1001000];
int top[1001000];
int n;
int get(int a, int b) {
  int ret = ps[b];
  if (a) ret -= ps[a - 1];
  return ret;
}
struct bit {
  int* T;
  int len;
  void clear() {
    len = 4 * n;
    T = (int*)malloc((len) * sizeof(int));
    for (int i = 0; i < len; i++) T[i] = 0;
  }
  void update(int idx, int val) {
    idx++;
    while (idx < len) {
      T[idx] = (T[idx] + val) % 1000000007;
      idx += idx & -idx;
    }
  }
  int query(int idx) {
    idx++;
    int ret = 0;
    while (idx) {
      ret = (ret + T[idx]) % 1000000007;
      idx -= idx & -idx;
    }
    return ret;
  }
  int get(int a, int b) {
    int ret = query(b);
    if (a) ret -= query(a - 1);
    if (ret < 0) ret += 1000000007;
    return ret;
  }
};
bit meio[1001000];
bit ult[1001000];
int main() {
  int k;
  long long l;
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i].first);
    arr[i].second = i;
  }
  long long blocks = l / n;
  if (l % n) blocks++;
  sort(arr, arr + n);
  int rem = l % n;
  for (int i = 0; i < n; i++)
    if (arr[i].second < rem) ps[i]++;
  for (int i = 1; i < n; i++) ps[i] += ps[i - 1];
  top[0] = 0;
  for (int i = 1; i < n; i++) {
    if (arr[i].first == arr[i - 1].first)
      top[i] = top[i - 1];
    else
      top[i] = i;
  }
  for (int i = 0; i <= k; i++) {
    meio[i].clear();
    ult[i].clear();
  }
  for (int i = 0; i < n; i++) {
    ult[1].update(i, get(top[i], n - 1));
    ;
  }
  for (int i = 0; i < n; i++) {
    meio[1].update(i, n - top[i]);
    ;
  }
  for (int i = 2; i <= k; i++) {
    for (int j = 0; j < n; j++) {
      ult[i].update(j, ult[i - 1].get(top[j], n - 1));
      ;
    }
    for (int j = 0; j < n; j++) {
      meio[i].update(j, meio[i - 1].get(top[j], n - 1));
      ;
    }
  }
  int ans = l % 1000000007;
  for (int i = 2; i <= k; i++) {
    if (i > blocks) break;
    ;
    ans += ult[i - 1].get(0, n - 1);
    ;
    ans %= 1000000007;
    long long qnt = blocks - i;
    if (qnt < 0) {
      qnt %= 1000000007;
      qnt += 1000000007;
    }
    if (l % n == 0) qnt++;
    qnt %= 1000000007;
    ans += ((long long)meio[i - 1].get(0, n - 1) * qnt) % 1000000007;
    ;
    ans %= 1000000007;
  }
  printf("%d\n", ans);
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

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;
pair<int, int> arr[1001000];
int ps[1001000];
int top[1001000];
int n;
int get(int a, int b) {
  int ret = ps[b];
  if (a) ret -= ps[a - 1];
  return ret;
}
struct bit {
  int* T;
  int len;
  void clear() {
    len = 4 * n;
    T = (int*)malloc((len) * sizeof(int));
    for (int i = 0; i < len; i++) T[i] = 0;
  }
  void update(int idx, int val) {
    idx++;
    while (idx < len) {
      T[idx] = (T[idx] + val) % 1000000007;
      idx += idx & -idx;
    }
  }
  int query(int idx) {
    idx++;
    int ret = 0;
    while (idx) {
      ret = (ret + T[idx]) % 1000000007;
      idx -= idx & -idx;
    }
    return ret;
  }
  int get(int a, int b) {
    int ret = query(b);
    if (a) ret -= query(a - 1);
    if (ret < 0) ret += 1000000007;
    return ret;
  }
};
bit meio[1001000];
bit ult[1001000];
int main() {
  int k;
  long long l;
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i].first);
    arr[i].second = i;
  }
  long long blocks = l / n;
  if (l % n) blocks++;
  sort(arr, arr + n);
  int rem = l % n;
  for (int i = 0; i < n; i++)
    if (arr[i].second < rem) ps[i]++;
  for (int i = 1; i < n; i++) ps[i] += ps[i - 1];
  top[0] = 0;
  for (int i = 1; i < n; i++) {
    if (arr[i].first == arr[i - 1].first)
      top[i] = top[i - 1];
    else
      top[i] = i;
  }
  for (int i = 0; i <= k; i++) {
    meio[i].clear();
    ult[i].clear();
  }
  for (int i = 0; i < n; i++) {
    ult[1].update(i, get(top[i], n - 1));
    ;
  }
  for (int i = 0; i < n; i++) {
    meio[1].update(i, n - top[i]);
    ;
  }
  for (int i = 2; i <= k; i++) {
    for (int j = 0; j < n; j++) {
      ult[i].update(j, ult[i - 1].get(top[j], n - 1));
      ;
    }
    for (int j = 0; j < n; j++) {
      meio[i].update(j, meio[i - 1].get(top[j], n - 1));
      ;
    }
  }
  int ans = l % 1000000007;
  for (int i = 2; i <= k; i++) {
    if (i > blocks) break;
    ;
    ans += ult[i - 1].get(0, n - 1);
    ;
    ans %= 1000000007;
    long long qnt = blocks - i;
    if (qnt < 0) {
      qnt %= 1000000007;
      qnt += 1000000007;
    }
    if (l % n == 0) qnt++;
    qnt %= 1000000007;
    ans += ((long long)meio[i - 1].get(0, n - 1) * qnt) % 1000000007;
    ;
    ans %= 1000000007;
  }
  printf("%d\n", ans);
}

```