MOD = 10 ** 9 + 7 # PyPy用行列累乗 https://qiita.com/ophhdn/items/e6451ec5983939ecbc5b から拝借しています。 def mat_mul(a, b): I, J, K = len(a), len(b[0]), len(b) c = [[0] * J for _ in range(I)] for i in range(I): for j in range(J): for k in range(K): c[i][j] += a[i][k] * b[k][j] c[i][j] %= MOD return c def mat_pow(x, n): y = [[0] * len(x) for _ in range(len(x))] for i in range(len(x)): y[i][i] = 1 while n > 0: if n & 1: y = mat_mul(x, y) x = mat_mul(x, x) n >>= 1 return y N, K, L = map(int, input().split()) matr = [[0] * N for _ in range(N)] for i in range(N): for j in range(L): matr[i][(i + 1 + j) % N] = 1 res = mat_pow(matr, K)[0] print(*res, sep="\n")