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;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(long long &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const long long &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1e6 + 10;
long long mypow(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % MOD;
    y >>= 1;
    x = x * x % MOD;
  }
  return res;
}
long long fac[SIZE], inv[SIZE];
long long C(int x, int y) {
  if (y < 0 || y > x) return 0;
  long long res = 1;
  for (int i = (1); i <= (y); ++i) res = res * (x + 1 - i) % MOD;
  return res * inv[y] % MOD;
}
void build() {
  assert(MOD >= SIZE);
  fac[0] = 1;
  for (int i = (1); i < (SIZE); ++i) fac[i] = fac[i - 1] * i % MOD;
  inv[SIZE - 1] = mypow(fac[SIZE - 1], MOD - 2);
  for (int i = SIZE - 2; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % MOD;
}
int N, K, M;
long long cnt[15][100];
int cnt_len[15];
long long dp[15][15][100];
int qq[15];
void dfs0(int id, int lt, long long v) {
  ADD(cnt[id][qq[id - 1]], v);
  if (id == K) return;
  for (int i = (1); i <= (M); ++i) {
    qq[id] = qq[id - 1] + i;
    while (qq[lt] < qq[id] - M) lt++;
    dfs0(id + 1, lt, v * (id - lt + 1) % MOD);
  }
}
int main() {
  build();
  R(N, K, M);
  qq[0] = 1;
  dfs0(1, 0, 1);
  dp[0][0][0] = 1;
  for (int i = 0; i < (15); ++i) {
    for (int j = 0; j < (100); ++j) {
      if (cnt[i][j]) cnt_len[i] = j;
    }
  }
  for (int i = 0; i < (K); ++i) {
    for (int j = 0; j < (K); ++j) {
      for (int k = 0; k < (100); ++k) {
        if (!dp[i][j][k]) continue;
        for (int use_num = 1; use_num + j <= K; use_num++) {
          for (int dd = (1); dd <= (cnt_len[use_num]); ++dd) {
            if (!i) {
              ADD(dp[i + 1][j + use_num][k + dd],
                  dp[i][j][k] * cnt[use_num][dd]);
            } else {
              ADD(dp[i + 1][j + use_num][k + dd + M],
                  dp[i][j][k] * cnt[use_num][dd]);
            }
          }
        }
      }
    }
  }
  long long an = 0;
  for (int i = (1); i <= (K); ++i) {
    for (int k = 0; k < (100); ++k) {
      if (!dp[i][K][k]) continue;
      if (k > N) continue;
      ADD(an, dp[i][K][k] * C(N - k + i, i));
    }
  }
  W(an);
  return 0;
}
