#include <bits/stdc++.h>
const int maxn = 2002;
const int M = 1000000007;
class matrix {
 public:
  int a[maxn], n;
  matrix() : n(0) { memset(a, 0, sizeof a); }
  matrix(int _n) : n(_n) { memset(a, 0, sizeof a); }
  matrix operator*(matrix b) {
    matrix a = *this;
    matrix c(n);
    for (int i = 0; i < n; i++)
      for (int j = 0; j <= i; j++)
        c.a[i] = (c.a[i] + (int)((1ll * a.a[j] * b.a[i - j]) % M)) % M;
    return c;
  }
};
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  matrix a(n), b(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a.a[i]);
    b.a[i] = 1;
  }
  while (k) {
    if (k & 1) a = a * b;
    k >>= 1;
    b = b * b;
  }
  for (int i = 0; i < n; i++) printf("%d ", a.a[i]);
  return 0;
}
