#include <bits/stdc++.h>
using namespace std;
std::string dbgDelim(int &i) { return (i++ == 0 ? "" : ", "); }
template <class T>
std::ostream &operator<<(std::ostream &os, std::vector<T> v);
template <class T>
std::ostream &operator<<(std::ostream &os, std::set<T> v);
template <class T>
std::ostream &operator<<(std::ostream &os, std::queue<T> q);
template <class T>
std::ostream &operator<<(std::ostream &os, std::priority_queue<T> q);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::pair<T, K> p);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::map<T, K> mp);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::unordered_map<T, K> mp);
template <int INDEX, class TUPLE>
void dbgDeploy(std::ostream &os, TUPLE tuple) {}
template <int INDEX, class TUPLE, class H, class... Ts>
void dbgDeploy(std::ostream &os, TUPLE t) {
  os << (INDEX == 0 ? "" : ", ") << get<INDEX>(t);
  dbgDeploy<INDEX + 1, TUPLE, Ts...>(os, t);
}
template <class T, class K>
void dbgDeploy(std::ostream &os, std::pair<T, K> p, std::string delim) {
  os << "(" << p.first << delim << p.second << ")";
}
template <class... Ts>
std::ostream &operator<<(std::ostream &os, std::tuple<Ts...> t) {
  os << "(";
  dbgDeploy<0, std::tuple<Ts...>, Ts...>(os, t);
  os << ")";
  return os;
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::pair<T, K> p) {
  dbgDeploy(os, p, ", ");
  return os;
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::vector<T> v) {
  {
    int i = 0;
    os << "{";
    {
      for (T t : v) {
        os << dbgDelim(i) << t;
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::set<T> s) {
  {
    int i = 0;
    os << "{";
    {
      for (T t : s) {
        os << dbgDelim(i) << t;
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::queue<T> q) {
  {
    int i = 0;
    os << "{";
    {
      for (; q.size(); q.pop()) {
        os << dbgDelim(i) << q.front();
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::priority_queue<T> q) {
  {
    int i = 0;
    os << "{";
    {
      for (; q.size(); q.pop()) {
        os << dbgDelim(i) << q.top();
      };
    }
    os << "}";
    return os;
  };
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::map<T, K> mp) {
  {
    int i = 0;
    os << "{";
    {
      for (auto p : mp) {
        os << dbgDelim(i);
        dbgDeploy(os, p, "->");
      };
    }
    os << "}";
    return os;
  };
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::unordered_map<T, K> mp) {
  {
    int i = 0;
    os << "{";
    {
      for (auto p : mp) {
        os << dbgDelim(i);
        dbgDeploy(os, p, "->");
      };
    }
    os << "}";
    return os;
  };
}
template <typename T>
class GF {
 public:
  static const T mod = 1e9 + 7;
  GF() {
    permutation_memo = std::vector<T>(1, 1);
    inverse_memo = std::vector<T>(2, 1);
    permutation_inverse_memo = std::vector<T>(2, 1);
  }
  T norm(T i);
  T add(T i0, T i1);
  T sub(T i0, T i1);
  T mul(T i0, T i1);
  T div(T i0, T i1);
  T pow(T i, int64_t p);
  T inv(T i);
  T permInv(T i);
  T permutation(T n, T m);
  T combination(T n, T m);

 private:
  static const int MEMO_SIZE_LIMIT = 2000000;
  std::vector<T> permutation_memo;
  std::vector<T> inverse_memo;
  std::vector<T> permutation_inverse_memo;
};
template <typename T>
inline T GF<T>::permutation(T n, T m) {
  if (m < 0 || n < m) return 0;
  while (permutation_memo.size() <= n) {
    permutation_memo.push_back(
        mul(permutation_memo.back(), permutation_memo.size()));
  }
  return mul(permutation_memo[n], permInv(n - m));
}
template <typename T>
inline T GF<T>::combination(T n, T m) {
  if (m < 0 || n < m) return 0;
  if (n - m < m) m = n - m;
  if (n < MEMO_SIZE_LIMIT) {
    T num = permutation(n, n);
    T den = mul(permInv(m), permInv(n - m));
    return mul(num, den);
  }
  T num = 1, den = 1;
  for (T i = 0; i < m; ++i) {
    num = mul(num, n - i);
    den = mul(den, i + 1);
  }
  return div(num, den);
}
template <typename T>
inline T GF<T>::norm(T i) {
  return (i % mod + mod) % mod;
}
template <typename T>
inline T GF<T>::add(T i0, T i1) {
  T res = i0 + i1;
  if (mod <= res) return res - mod;
  return res;
}
template <typename T>
inline T GF<T>::sub(T i0, T i1) {
  T res = i0 - i1;
  if (res < 0) return res + mod;
  return res;
}
template <typename T>
inline T GF<T>::mul(T i0, T i1) {
  return (int64_t)i0 * i1 % mod;
}
template <typename T>
inline T GF<T>::div(T i0, T i1) {
  return mul(i0, inv(i1));
}
template <typename T>
inline T GF<T>::permInv(T i) {
  while (permutation_inverse_memo.size() <= i) {
    permutation_inverse_memo.push_back(mul(
        permutation_inverse_memo.back(), inv(permutation_inverse_memo.size())));
  }
  return permutation_inverse_memo[i];
}
template <typename T>
inline T GF<T>::inv(T i) {
  if (i < MEMO_SIZE_LIMIT) {
    while (inverse_memo.size() <= i) {
      int size = inverse_memo.size();
      inverse_memo.push_back(mod - (int64_t)(mod / size) *
                                       inverse_memo[mod % size] % mod);
    }
    return inverse_memo[i];
  }
  return this->pow(i, mod - 2);
}
template <typename T>
inline T GF<T>::pow(T i, int64_t p) {
  T res = 1;
  for (; p; p >>= 1) {
    if (p & 1) res = mul(res, i);
    i = mul(i, i);
  }
  return res;
}
int main() {
  GF<int> gf;
  int64_t n, l, k;
  cin >> n >> l >> k;
  vector<int> a(n);
  for (int64_t i = 0; i < ((int64_t)(n)); ++i) scanf("%d", &a[i]);
  vector<vector<int64_t>> dp(k + 1, vector<int64_t>(n, 0));
  for (int64_t i = 0; i < ((int64_t)(n)); ++i) dp[0][i] = 1;
  const int64_t MOD = 1e9 + 7;
  int64_t ans = 0;
  for (int64_t i = 0; i < ((int64_t)(k)); ++i) {
    for (int64_t j = 0; j < ((int64_t)(n)); ++j)
      ans = gf.add(
          ans, gf.mul(dp[i][j],
                      max((int64_t)0, l / n + (j < l % n ? 1 : 0) - i) % MOD));
    vector<tuple<int64_t, int64_t>> v;
    for (int64_t j = 0; j < ((int64_t)(n)); ++j)
      v.push_back(make_tuple(a[j], dp[i][j]));
    sort((v).begin(), (v).end());
    int64_t total = 0;
    unordered_map<int64_t, int64_t> mp;
    for (int64_t j = 0; j < ((int64_t)(n)); ++j) {
      total = gf.add(total, get<1>(v[j]));
      mp[get<0>(v[j])] = total;
    }
    for (int64_t j = 0; j < ((int64_t)(n)); ++j) dp[i + 1][j] = mp[a[j]];
  }
  cout << ans << endl;
}

### Prompt

Generate 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;
std::string dbgDelim(int &i) { return (i++ == 0 ? "" : ", "); }
template <class T>
std::ostream &operator<<(std::ostream &os, std::vector<T> v);
template <class T>
std::ostream &operator<<(std::ostream &os, std::set<T> v);
template <class T>
std::ostream &operator<<(std::ostream &os, std::queue<T> q);
template <class T>
std::ostream &operator<<(std::ostream &os, std::priority_queue<T> q);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::pair<T, K> p);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::map<T, K> mp);
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::unordered_map<T, K> mp);
template <int INDEX, class TUPLE>
void dbgDeploy(std::ostream &os, TUPLE tuple) {}
template <int INDEX, class TUPLE, class H, class... Ts>
void dbgDeploy(std::ostream &os, TUPLE t) {
  os << (INDEX == 0 ? "" : ", ") << get<INDEX>(t);
  dbgDeploy<INDEX + 1, TUPLE, Ts...>(os, t);
}
template <class T, class K>
void dbgDeploy(std::ostream &os, std::pair<T, K> p, std::string delim) {
  os << "(" << p.first << delim << p.second << ")";
}
template <class... Ts>
std::ostream &operator<<(std::ostream &os, std::tuple<Ts...> t) {
  os << "(";
  dbgDeploy<0, std::tuple<Ts...>, Ts...>(os, t);
  os << ")";
  return os;
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::pair<T, K> p) {
  dbgDeploy(os, p, ", ");
  return os;
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::vector<T> v) {
  {
    int i = 0;
    os << "{";
    {
      for (T t : v) {
        os << dbgDelim(i) << t;
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::set<T> s) {
  {
    int i = 0;
    os << "{";
    {
      for (T t : s) {
        os << dbgDelim(i) << t;
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::queue<T> q) {
  {
    int i = 0;
    os << "{";
    {
      for (; q.size(); q.pop()) {
        os << dbgDelim(i) << q.front();
      };
    }
    os << "}";
    return os;
  };
}
template <class T>
std::ostream &operator<<(std::ostream &os, std::priority_queue<T> q) {
  {
    int i = 0;
    os << "{";
    {
      for (; q.size(); q.pop()) {
        os << dbgDelim(i) << q.top();
      };
    }
    os << "}";
    return os;
  };
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::map<T, K> mp) {
  {
    int i = 0;
    os << "{";
    {
      for (auto p : mp) {
        os << dbgDelim(i);
        dbgDeploy(os, p, "->");
      };
    }
    os << "}";
    return os;
  };
}
template <class T, class K>
std::ostream &operator<<(std::ostream &os, std::unordered_map<T, K> mp) {
  {
    int i = 0;
    os << "{";
    {
      for (auto p : mp) {
        os << dbgDelim(i);
        dbgDeploy(os, p, "->");
      };
    }
    os << "}";
    return os;
  };
}
template <typename T>
class GF {
 public:
  static const T mod = 1e9 + 7;
  GF() {
    permutation_memo = std::vector<T>(1, 1);
    inverse_memo = std::vector<T>(2, 1);
    permutation_inverse_memo = std::vector<T>(2, 1);
  }
  T norm(T i);
  T add(T i0, T i1);
  T sub(T i0, T i1);
  T mul(T i0, T i1);
  T div(T i0, T i1);
  T pow(T i, int64_t p);
  T inv(T i);
  T permInv(T i);
  T permutation(T n, T m);
  T combination(T n, T m);

 private:
  static const int MEMO_SIZE_LIMIT = 2000000;
  std::vector<T> permutation_memo;
  std::vector<T> inverse_memo;
  std::vector<T> permutation_inverse_memo;
};
template <typename T>
inline T GF<T>::permutation(T n, T m) {
  if (m < 0 || n < m) return 0;
  while (permutation_memo.size() <= n) {
    permutation_memo.push_back(
        mul(permutation_memo.back(), permutation_memo.size()));
  }
  return mul(permutation_memo[n], permInv(n - m));
}
template <typename T>
inline T GF<T>::combination(T n, T m) {
  if (m < 0 || n < m) return 0;
  if (n - m < m) m = n - m;
  if (n < MEMO_SIZE_LIMIT) {
    T num = permutation(n, n);
    T den = mul(permInv(m), permInv(n - m));
    return mul(num, den);
  }
  T num = 1, den = 1;
  for (T i = 0; i < m; ++i) {
    num = mul(num, n - i);
    den = mul(den, i + 1);
  }
  return div(num, den);
}
template <typename T>
inline T GF<T>::norm(T i) {
  return (i % mod + mod) % mod;
}
template <typename T>
inline T GF<T>::add(T i0, T i1) {
  T res = i0 + i1;
  if (mod <= res) return res - mod;
  return res;
}
template <typename T>
inline T GF<T>::sub(T i0, T i1) {
  T res = i0 - i1;
  if (res < 0) return res + mod;
  return res;
}
template <typename T>
inline T GF<T>::mul(T i0, T i1) {
  return (int64_t)i0 * i1 % mod;
}
template <typename T>
inline T GF<T>::div(T i0, T i1) {
  return mul(i0, inv(i1));
}
template <typename T>
inline T GF<T>::permInv(T i) {
  while (permutation_inverse_memo.size() <= i) {
    permutation_inverse_memo.push_back(mul(
        permutation_inverse_memo.back(), inv(permutation_inverse_memo.size())));
  }
  return permutation_inverse_memo[i];
}
template <typename T>
inline T GF<T>::inv(T i) {
  if (i < MEMO_SIZE_LIMIT) {
    while (inverse_memo.size() <= i) {
      int size = inverse_memo.size();
      inverse_memo.push_back(mod - (int64_t)(mod / size) *
                                       inverse_memo[mod % size] % mod);
    }
    return inverse_memo[i];
  }
  return this->pow(i, mod - 2);
}
template <typename T>
inline T GF<T>::pow(T i, int64_t p) {
  T res = 1;
  for (; p; p >>= 1) {
    if (p & 1) res = mul(res, i);
    i = mul(i, i);
  }
  return res;
}
int main() {
  GF<int> gf;
  int64_t n, l, k;
  cin >> n >> l >> k;
  vector<int> a(n);
  for (int64_t i = 0; i < ((int64_t)(n)); ++i) scanf("%d", &a[i]);
  vector<vector<int64_t>> dp(k + 1, vector<int64_t>(n, 0));
  for (int64_t i = 0; i < ((int64_t)(n)); ++i) dp[0][i] = 1;
  const int64_t MOD = 1e9 + 7;
  int64_t ans = 0;
  for (int64_t i = 0; i < ((int64_t)(k)); ++i) {
    for (int64_t j = 0; j < ((int64_t)(n)); ++j)
      ans = gf.add(
          ans, gf.mul(dp[i][j],
                      max((int64_t)0, l / n + (j < l % n ? 1 : 0) - i) % MOD));
    vector<tuple<int64_t, int64_t>> v;
    for (int64_t j = 0; j < ((int64_t)(n)); ++j)
      v.push_back(make_tuple(a[j], dp[i][j]));
    sort((v).begin(), (v).end());
    int64_t total = 0;
    unordered_map<int64_t, int64_t> mp;
    for (int64_t j = 0; j < ((int64_t)(n)); ++j) {
      total = gf.add(total, get<1>(v[j]));
      mp[get<0>(v[j])] = total;
    }
    for (int64_t j = 0; j < ((int64_t)(n)); ++j) dp[i + 1][j] = mp[a[j]];
  }
  cout << ans << endl;
}

```