#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000007ll;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
int ext_gcd(int A, int B, int* X, int* Y) {
  int x, y, u, v, m, n, a, b, q, r;
  x = 0;
  y = 1;
  u = 1;
  v = 0;
  for (a = A, b = B; 0 != a; b = a, a = r, x = u, y = v, u = m, v = n) {
    q = b / a;
    r = b % a;
    m = x - (u * q);
    n = y - (v * q);
  }
  *X = x;
  *Y = y;
  return b;
}
inline long long modInv(int a, int m) {
  int x, y;
  ext_gcd(a, m, &x, &y);
  if (x < 0) x += m;
  return x;
}
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
long long n, l, k, ans;
long long a[1000006], b[1000006], c[1000006];
long long seen[1000006];
void cmpr(long long n) {
  long long now = 0;
  vector<long long> v;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    if (m.find(v[i]) == m.end()) {
      now++;
      m[v[i]] = now;
    }
  }
  for (long long i = 0; i < n; i++) a[i] = m[a[i]];
  return;
}
vector<long long> v[1000006];
void upd(long long id, long long pos, long long val) {
  while (pos <= n) {
    v[id][pos] = (v[id][pos] + val) % inf;
    pos += pos & -pos;
  }
  return;
}
long long qry(long long id, long long pos) {
  long long ans = 0;
  while (pos > 0) {
    ans = (ans + v[id][pos]) % inf;
    pos -= pos & -pos;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cmpr(n);
  for (long long i = 0; i < 1000004; i++) {
    if (i < n)
      b[i] = a[i];
    else
      b[i] = b[i - n];
  }
  ans = 0;
  for (long long i = 0; i < k; i++) {
    for (long long j = 0; j <= n; j++) v[i].push_back(0);
  }
  for (long long i = 0; i < n; i++) {
    if (i >= l) break;
    upd(0, b[i], 1);
    long long tms = (l - 1) - i;
    tms /= n;
    tms++;
    tms %= inf;
    ans = (ans + tms % inf) % inf;
  }
  long long cnt = 1;
  for (long long i = n; i < n * k; i += n, cnt++) {
    if (i >= l) break;
    for (long long j = i; j < i + n && j < l; j++) {
      c[j] = qry(cnt - 1, b[j]);
      long long tms = (l - 1) - j;
      tms /= n;
      tms++;
      tms %= inf;
      ans = (ans + (tms * c[j]) % inf) % inf;
    }
    for (long long j = i; j < i + n && j < l; j++) {
      upd(cnt, b[j], c[j]);
    }
  }
  cout << ans << endl;
  return 0;
}

### Prompt

Please formulate a Cpp solution 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 long long inf = 1000000007ll;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
int ext_gcd(int A, int B, int* X, int* Y) {
  int x, y, u, v, m, n, a, b, q, r;
  x = 0;
  y = 1;
  u = 1;
  v = 0;
  for (a = A, b = B; 0 != a; b = a, a = r, x = u, y = v, u = m, v = n) {
    q = b / a;
    r = b % a;
    m = x - (u * q);
    n = y - (v * q);
  }
  *X = x;
  *Y = y;
  return b;
}
inline long long modInv(int a, int m) {
  int x, y;
  ext_gcd(a, m, &x, &y);
  if (x < 0) x += m;
  return x;
}
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
long long n, l, k, ans;
long long a[1000006], b[1000006], c[1000006];
long long seen[1000006];
void cmpr(long long n) {
  long long now = 0;
  vector<long long> v;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    if (m.find(v[i]) == m.end()) {
      now++;
      m[v[i]] = now;
    }
  }
  for (long long i = 0; i < n; i++) a[i] = m[a[i]];
  return;
}
vector<long long> v[1000006];
void upd(long long id, long long pos, long long val) {
  while (pos <= n) {
    v[id][pos] = (v[id][pos] + val) % inf;
    pos += pos & -pos;
  }
  return;
}
long long qry(long long id, long long pos) {
  long long ans = 0;
  while (pos > 0) {
    ans = (ans + v[id][pos]) % inf;
    pos -= pos & -pos;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> l >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cmpr(n);
  for (long long i = 0; i < 1000004; i++) {
    if (i < n)
      b[i] = a[i];
    else
      b[i] = b[i - n];
  }
  ans = 0;
  for (long long i = 0; i < k; i++) {
    for (long long j = 0; j <= n; j++) v[i].push_back(0);
  }
  for (long long i = 0; i < n; i++) {
    if (i >= l) break;
    upd(0, b[i], 1);
    long long tms = (l - 1) - i;
    tms /= n;
    tms++;
    tms %= inf;
    ans = (ans + tms % inf) % inf;
  }
  long long cnt = 1;
  for (long long i = n; i < n * k; i += n, cnt++) {
    if (i >= l) break;
    for (long long j = i; j < i + n && j < l; j++) {
      c[j] = qry(cnt - 1, b[j]);
      long long tms = (l - 1) - j;
      tms /= n;
      tms++;
      tms %= inf;
      ans = (ans + (tms * c[j]) % inf) % inf;
    }
    for (long long j = i; j < i + n && j < l; j++) {
      upd(cnt, b[j], c[j]);
    }
  }
  cout << ans << endl;
  return 0;
}

```