#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 5;
const int MOD = 1000000000 + 7;
int n, k;
int a[maxn], e[maxn], s[maxn], t[maxn];
inline void mm(int a[], int b[]) {
  for (int i = 0; i < n; i++) {
    t[i] = 0;
    for (int j = 0; j <= i; j++)
      t[i] = ((long long)a[j] * b[i - j] + t[i]) % MOD;
  }
  for (int i = 0; i < n; i++) a[i] = t[i];
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    e[i] = 1;
  }
  s[0] = 1;
  while (k) {
    if (k & 1) mm(s, e);
    mm(e, e);
    k >>= 1;
  }
  mm(a, s);
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  return 0;
}
