This problem is same as the previous one, but has larger constraints.

Aki is playing a new video game. In the video game, he will control Neko, the giant cat, to fly between planets in the Catniverse.

There are n planets in the Catniverse, numbered from 1 to n. At the beginning of the game, Aki chooses the planet where Neko is initially located. Then Aki performs k - 1 moves, where in each move Neko is moved from the current planet x to some other planet y such that:

  * Planet y is not visited yet. 
  * 1 ≤ y ≤ x + m (where m is a fixed constant given in the input) 



This way, Neko will visit exactly k different planets. Two ways of visiting planets are called different if there is some index i such that, the i-th planet visited in the first way is different from the i-th planet visited in the second way.

What is the total number of ways to visit k planets this way? Since the answer can be quite large, print it modulo 10^9 + 7.

Input

The only line contains three integers n, k and m (1 ≤ n ≤ 10^9, 1 ≤ k ≤ min(n, 12), 1 ≤ m ≤ 4) — the number of planets in the Catniverse, the number of planets Neko needs to visit and the said constant m.

Output

Print exactly one integer — the number of different ways Neko can visit exactly k planets. Since the answer can be quite large, print it modulo 10^9 + 7.

Examples

Input


3 3 1


Output


4


Input


4 2 1


Output


9


Input


5 5 4


Output


120


Input


100 1 2


Output


100

Note

In the first example, there are 4 ways Neko can visit all the planets:

  * 1 → 2 → 3 
  * 2 → 3 → 1 
  * 3 → 1 → 2 
  * 3 → 2 → 1 



In the second example, there are 9 ways Neko can visit exactly 2 planets:

  * 1 → 2 
  * 2 → 1 
  * 2 → 3 
  * 3 → 1 
  * 3 → 2 
  * 3 → 4 
  * 4 → 1 
  * 4 → 2 
  * 4 → 3 



In the third example, with m = 4, Neko can visit all the planets in any order, so there are 5! = 120 ways Neko can visit all the planets.

In the fourth example, Neko only visit exactly 1 planet (which is also the planet he initially located), and there are 100 ways to choose the starting planet for Neko.
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
inline int read() {
  int w = 1, s = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return w * s;
}
inline long long ksm(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return res;
}
inline int pls(int a, int b) {
  a += b;
  return a >= mod ? a - mod : a;
}
inline int mns(int a, int b) {
  a -= b;
  return a < 0 ? a + mod : a;
}
int n, k, m, Idx[15][222], cnt;
pair<int, int> tmp[101000];
struct Ma {
  int a[417][417];
  inline void I() {
    memset(a, 0, sizeof(a));
    for (register int i = 1; i <= cnt; ++i) a[i][i] = 1;
  }
} trs, Ans;
inline Ma operator*(Ma p, Ma q) {
  Ma res;
  memset(res.a, 0, sizeof(res.a));
  for (register int i = 1; i <= cnt; ++i)
    for (register int j = 1; j <= cnt; ++j) {
      int k = 1, v = 0;
      unsigned long long w = 0;
      for (; k + 15 <= cnt; k += 16)
        v = (v + (unsigned long long)p.a[i][k] * q.a[k][j] +
             (unsigned long long)p.a[i][k + 1] * q.a[k + 1][j] +
             (unsigned long long)p.a[i][k + 2] * q.a[k + 2][j] +
             (unsigned long long)p.a[i][k + 3] * q.a[k + 3][j] +
             (unsigned long long)p.a[i][k + 4] * q.a[k + 4][j] +
             (unsigned long long)p.a[i][k + 5] * q.a[k + 5][j] +
             (unsigned long long)p.a[i][k + 6] * q.a[k + 6][j] +
             (unsigned long long)p.a[i][k + 7] * q.a[k + 7][j] +
             (unsigned long long)p.a[i][k + 8] * q.a[k + 8][j] +
             (unsigned long long)p.a[i][k + 9] * q.a[k + 9][j] +
             (unsigned long long)p.a[i][k + 10] * q.a[k + 10][j] +
             (unsigned long long)p.a[i][k + 11] * q.a[k + 11][j] +
             (unsigned long long)p.a[i][k + 12] * q.a[k + 12][j] +
             (unsigned long long)p.a[i][k + 13] * q.a[k + 13][j] +
             (unsigned long long)p.a[i][k + 14] * q.a[k + 14][j] +
             (unsigned long long)p.a[i][k + 15] * q.a[k + 15][j]) %
            mod;
      for (; k <= cnt; k++) w += (unsigned long long)p.a[i][k] * q.a[k][j];
      res.a[i][j] = (v + w) % mod;
    }
  return res;
}
inline Ma ksm(Ma x, int y) {
  Ma res;
  res.I();
  while (y) {
    if (y & 1) res = res * x;
    x = x * x;
    y >>= 1;
  }
  return res;
}
inline void Solve() {
  memset(trs.a, 0, sizeof(trs.a));
  memset(Ans.a, 0, sizeof(Ans.a));
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    if (sec & 1) {
      sec >>= 1;
      trs.a[i][Idx[fir][sec]] = bit;
      sec |= (1 << m);
      fir++;
      trs.a[i][Idx[fir][sec]] = bit;
    } else {
      sec >>= 1;
      trs.a[i][Idx[fir][sec]] = 1;
      sec |= (1 << m);
      fir++;
      trs.a[i][Idx[fir][sec]] = 1;
    }
  }
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    if (fir == bit) Ans.a[1][i] = 1;
  }
  Ans = Ans * ksm(trs, n - m - 1);
  long long ans = 0;
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    int oo = 1;
    for (register int i = 1; i <= bit; ++i) oo *= i;
    if (fir == k) {
      ans = pls(ans, 1ll * Ans.a[1][i] * oo % mod);
    }
  }
  cout << ans;
}
int main() {
  n = read(), k = read(), m = read();
  m = min(m, n - 1);
  int all = 1 << (m + 1);
  all--;
  for (register int i = 0; i <= k; ++i) {
    for (register int j = 0; j <= all; ++j) {
      Idx[i][j] = ++cnt;
      tmp[cnt] = make_pair(i, j);
    }
  }
  Solve();
  return 0;
}
