#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
const int mod = 1E9 + 7;
int N;
void isp(const int* T) {
  for (int i = 0; i < N; ++i) printf("%d ", T[i]);
  printf("\n");
}
int tmp[maxn];
int T[maxn];
int sol[maxn];
int X[maxn];
void multy(const int* A, const int* B, int* C) {
  memset(C, 0, maxn * sizeof(int));
  for (int i = 0; i < N; ++i)
    for (int j = 0; j <= i; j++) {
      C[i] = (C[i] + (long long)A[j] * B[i - j]) % mod;
    }
}
void SetSol(int k) {
  for (int i = 0; i < N; i++) T[i] = 1;
  memset(sol, 0, sizeof sol);
  sol[0] = 1;
  for (; k > 0; k >>= 1) {
    if (k & 1) {
      multy(sol, T, tmp);
      for (int i = 0; i < N; i++) sol[i] = tmp[i];
    }
    multy(T, T, tmp);
    for (int i = 0; i < N; ++i) T[i] = tmp[i];
  }
}
int main() {
  int k;
  scanf("%d%d", &N, &k);
  for (int i = 0; i < N; ++i) scanf("%d", X + i);
  SetSol(k);
  multy(X, sol, tmp);
  isp(tmp);
}
