# https://tech.aru-zakki.com/python-pow-matrix/ def matmul(A, B, mod): N = len(A) K = len(A[0]) M = len(B[0]) c = [[0 for _ in range(M)] for _ in range(N)] for i in range(N) : for j in range(K) : for k in range(M) : c[i][k] += A[i][j] * B[j][k] c[i][k] %= mod return c def pow_matrix(A, p, mod): n = len(A) # 単位行列 c = [[1 if i == j else 0 for i in range(n)] for j in range(n)] while p > 0 : if p%2 == 1 : c = matmul(c, A, mod) A = matmul(A, A, mod) p //= 2 return c import sys input = sys.stdin.readline MOD = 998244353 N, K = map(int, input().split()) A = list(map(int, input().split())) AA = [A] B = [[(1 if i%2==0 else -1) if j>=i else 0 for j in range(N)] for i in range(N)] BB = pow_matrix(B, K, MOD) ans = matmul(AA, BB, MOD) print(*ans[0])