#include <bits/stdc++.h>
using namespace std;
const int dr[] = {0, 0, -1, 1, -1, -1, 1, 1};
const int dc[] = {-1, 1, 0, 0, -1, 1, -1, 1};
int read() {
  int ret = 0, flag = 0;
  char ch;
  if ((ch = getchar()) == '-')
    flag = 1;
  else if (ch >= '0' && ch <= '9')
    ret = ch - '0';
  while ((ch = getchar()) >= '0' && ch <= '9') ret = ret * 10 + (ch - '0');
  return flag ? -ret : ret;
}
const long long MOD = 1000000007;
const int maxn = 2000 + 3;
int N, K;
long long a[maxn], h[maxn], temp[maxn];
long long b[maxn];
void mul(long long *A, long long *B) {
  memset(temp, 0, sizeof(temp));
  for (int i = 1; i <= N; ++i)
    for (int j = 1; j <= i; ++j)
      temp[i] = (temp[i] + A[j] * B[i - j + 1]) % MOD;
  for (int i = 1; i <= N; ++i) A[i] = temp[i];
}
void pow(long long n) {
  for (int i = 1; i <= N; ++i) h[i] = 1;
  memset(b, 0, sizeof(b));
  b[1] = 1;
  while (n > 0) {
    if (n & 1) mul(b, h);
    mul(h, h);
    n >>= 1;
  }
}
long long num[maxn];
int main() {
  while (~scanf("%d%d", &N, &K)) {
    for (int i = 1; i <= N; ++i) scanf("%lld", &num[i]);
    pow(K);
    for (int i = 1; i <= N; ++i) {
      long long tem = 0;
      for (int j = 1; j <= i; ++j)
        tem = (tem + num[j] * b[i - j + 1] % MOD) % MOD;
      printf("%lld ", tem);
    }
    printf("\n");
  }
  return 0;
}
