You've got an array a, consisting of n integers. The array elements are indexed from 1 to n. Let's determine a two step operation like that:

  1. First we build by the array a an array s of partial sums, consisting of n elements. Element number i (1 ≤ i ≤ n) of array s equals <image>. The operation x mod y means that we take the remainder of the division of number x by number y. 
  2. Then we write the contents of the array s to the array a. Element number i (1 ≤ i ≤ n) of the array s becomes the i-th element of the array a (ai = si). 



You task is to find array a after exactly k described operations are applied.

Input

The first line contains two space-separated integers n and k (1 ≤ n ≤ 2000, 0 ≤ k ≤ 109). The next line contains n space-separated integers a1, a2, ..., an — elements of the array a (0 ≤ ai ≤ 109).

Output

Print n integers — elements of the array a after the operations are applied to it. Print the elements in the order of increasing of their indexes in the array a. Separate the printed numbers by spaces.

Examples

Input

3 1
1 2 3


Output

1 3 6


Input

5 0
3 14 15 92 6


Output

3 14 15 92 6
import java.io.*;
import java.util.*;

public class C implements Runnable {
	public static void main (String[] args) {new Thread(null, new C(), "_cf", 1 << 28).start();}

	int MOD = (int)1e9+7;
	int[] invFact;
	
	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");
		
		int n = fs.nextInt();
		
		int[] invs = new int[n+5];
		invs[1] = invs[0] = 1;
		for (int i = 2; i < invs.length; ++i) {
			long temp = MOD - (MOD / i);
			temp = mult(temp, invs[MOD % i]);
			invs[i] = (int)temp;
		}
		invFact = new int[n];
		invFact[0] = invs[0];
		for(int i = 1; i < n; i++) invFact[i] = mult(invFact[i-1], invs[i]);
		
		int k = fs.nextInt();
		int[] a = fs.nextIntArray(n);
		
		if(k == 0) {
			for(int i = 0; i < n; i++) {
				if(i > 0) out.print(" ");
				out.print(a[i]);
			}
			out.println();
			out.close();
			return;
		}
		k--;
		
		int[] coeffs = new int[n];
		coeffs[0] = 1;
		for(int i = 1; i < n; i++) {
			coeffs[i] = choose(i+k, i);
		}
		int[][] fin = new int[n][n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; i+j < n; j++) {
				fin[i+j][j] = coeffs[i];
			}
		}
		
		for(int i = 0; i < n; i++) {
			int res = 0;
			for(int j = 0; j <= i; j++) {
				res = add(res, mult(fin[i][j], a[j]));
			}
			if(i > 0) out.print(" ");
			out.print(res);
		}
		out.println();
		
		out.close();
	}
	
	int choose(int up, int lo) {
		long num = 1;
		for(int j = up-lo+1; j <= up; j++) num = mult(num, j);
		num = mult(num, invFact[lo]);
		return (int)num;
	}
	
	int add(int a, int b) {
		a += b;
		a %= MOD;
		return a;
	}
	
	int mult(long a, long b) {
		a *= b;
		a %= MOD;
		return (int)a;
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}