#include <bits/stdc++.h>
using namespace std;
long long m[2][2005], ans[2005];
int n, k, ind;
int a[2005];
int mul(int kk) {
  if (kk == 1) return 0;
  int get = mul(kk >> 1);
  int now = 1 ^ get;
  long long temp;
  for (int i = 1; i <= n; i++) m[now][i] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      temp = m[get][j];
      temp *= m[get][i + 1 - j];
      m[now][i] += temp;
      m[now][i] %= 1000000007;
    }
  }
  if (kk & 1) {
    for (int i = 1; i <= n; i++) {
      m[now][i] += m[now][i - 1];
      if (m[now][i] >= 1000000007) m[now][i] -= 1000000007;
    }
  }
  return now;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    m[0][i] = 1;
  }
  if (k != 0) {
    ind = mul(k);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= i; j++) {
        long long temp;
        temp = m[ind][j];
        temp *= a[i + 1 - j];
        ans[i] += temp;
        ans[i] %= 1000000007;
      }
    }
    for (int i = 1; i <= n; i++) {
      int temp2;
      temp2 = ans[i];
      if (i != 1) {
        printf(" ");
      }
      printf("%d", temp2);
    }
    printf("\n");
  } else {
    for (int i = 1; i <= n; i++) {
      if (i != 1) {
        printf(" ");
      }
      printf("%d", a[i]);
    }
    printf("\n");
  }
}
