#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const long long lloo = 1e18;
const int oo = 1e9;
const int MAXB = 1e6;
const int MAXN = 1e6 + 100;
const int base = 1e9 + 7;
int bit[2][MAXB + 1];
int st[2][MAXB + 1];
int dau[2][MAXB + 1];
int d[2];
map<int, int> Map;
int a[MAXN];
void initbit(int t) {
  for (int i = 0; i < d[t]; i++) {
    int x = st[t][i];
    bit[t][x] = 0;
    dau[t][x] = 0;
  }
  d[t] = 0;
}
int get(int t, int x) {
  int res = 0;
  while (x > 0) {
    res += bit[t][x];
    res %= base;
    x = x & (x - 1);
  }
  return res;
}
void update(int t, int x, int v) {
  while (x <= MAXB) {
    bit[t][x] += v;
    bit[t][x] %= base;
    if (dau[t][x] == 0) {
      st[t][d[t]++] = x;
      dau[t][x] = 1;
    }
    x += (x & (-x));
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, k;
  long long l;
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    Map[a[i]] = 1;
  }
  long long nblock = l / n;
  int dem = 1;
  for (__typeof(Map.begin()) it = Map.begin(); it != Map.end(); ++it) {
    it->second = dem++;
  }
  for (int i = 0; i < n; i++) {
    a[i] = Map[a[i]];
  }
  int t = 0;
  update(0, 1, 1);
  int res = 0;
  int fend = min(1ll * k, nblock);
  for (int i = 1, _b = fend; i <= _b; i++) {
    int sum = 0;
    initbit(1 - t);
    for (int j = 0; j < n; j++) {
      int x = a[j];
      int p = get(t, x);
      update(1 - t, x, p);
      sum += p;
      sum %= base;
    }
    res += 1ll * sum * ((nblock - i + 1) % base) % base;
    res %= base;
    t = 1 - t;
  }
  initbit(0);
  for (int i = 0; i < l % n; i++) {
    int x = MAXB - a[i] + 1;
    update(0, x, 1);
    res++;
    res %= base;
  }
  t = 0;
  fend = min((long long)k - 1, nblock);
  for (int i = 1, _b = fend; i <= _b; i++) {
    int sum = 0;
    initbit(1 - t);
    for (int j = 0; j < n; j++) {
      int x = MAXB - a[j] + 1;
      int p = get(t, x);
      update(1 - t, x, p);
      sum += p;
      sum %= base;
    }
    res += sum;
    res %= base;
    t = 1 - t;
  }
  cout << res << "\n";
}

### Prompt

Please create a solution in CPP to 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;
const double eps = 1e-8;
const long long lloo = 1e18;
const int oo = 1e9;
const int MAXB = 1e6;
const int MAXN = 1e6 + 100;
const int base = 1e9 + 7;
int bit[2][MAXB + 1];
int st[2][MAXB + 1];
int dau[2][MAXB + 1];
int d[2];
map<int, int> Map;
int a[MAXN];
void initbit(int t) {
  for (int i = 0; i < d[t]; i++) {
    int x = st[t][i];
    bit[t][x] = 0;
    dau[t][x] = 0;
  }
  d[t] = 0;
}
int get(int t, int x) {
  int res = 0;
  while (x > 0) {
    res += bit[t][x];
    res %= base;
    x = x & (x - 1);
  }
  return res;
}
void update(int t, int x, int v) {
  while (x <= MAXB) {
    bit[t][x] += v;
    bit[t][x] %= base;
    if (dau[t][x] == 0) {
      st[t][d[t]++] = x;
      dau[t][x] = 1;
    }
    x += (x & (-x));
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, k;
  long long l;
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    Map[a[i]] = 1;
  }
  long long nblock = l / n;
  int dem = 1;
  for (__typeof(Map.begin()) it = Map.begin(); it != Map.end(); ++it) {
    it->second = dem++;
  }
  for (int i = 0; i < n; i++) {
    a[i] = Map[a[i]];
  }
  int t = 0;
  update(0, 1, 1);
  int res = 0;
  int fend = min(1ll * k, nblock);
  for (int i = 1, _b = fend; i <= _b; i++) {
    int sum = 0;
    initbit(1 - t);
    for (int j = 0; j < n; j++) {
      int x = a[j];
      int p = get(t, x);
      update(1 - t, x, p);
      sum += p;
      sum %= base;
    }
    res += 1ll * sum * ((nblock - i + 1) % base) % base;
    res %= base;
    t = 1 - t;
  }
  initbit(0);
  for (int i = 0; i < l % n; i++) {
    int x = MAXB - a[i] + 1;
    update(0, x, 1);
    res++;
    res %= base;
  }
  t = 0;
  fend = min((long long)k - 1, nblock);
  for (int i = 1, _b = fend; i <= _b; i++) {
    int sum = 0;
    initbit(1 - t);
    for (int j = 0; j < n; j++) {
      int x = MAXB - a[j] + 1;
      int p = get(t, x);
      update(1 - t, x, p);
      sum += p;
      sum %= base;
    }
    res += sum;
    res %= base;
    t = 1 - t;
  }
  cout << res << "\n";
}

```