MOD = 10 ** 9 + 7 n, d, k = map(int, input().split()) A = [1] B = [0] + [1] * d def times(A, B): C = [0] * (len(A) + len(B) - 1) for i, a in enumerate(A): for j, b in enumerate(B): C[i + j] += a * b C[i + j] %= MOD return C[:k+1] while n > 0: if n & 1: A = times(A, B) n >>= 1 B = times(B, B) print(A[k])