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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;



public class ProblemC {

	int MOD = 1000000007;
	
	public static void main(String[] args) throws IOException {
		new ProblemC().solve();
	}
	
	private void solve() throws IOException {
		
		
		Reader in = new Reader(System.in);
		PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
		
		int N = in.nextInt();
		int k = in.nextInt();
		
		
		
		long[] X = new long[N];
		X[0] = 1;
		BigInteger curr = BigInteger.ONE;
		BigInteger num = BigInteger.valueOf(k);
		BigInteger den = BigInteger.valueOf(1);
		BigInteger MODB = BigInteger.valueOf(MOD);
		for (int i = 1; i < N; i++) {
			curr = curr.multiply(num).multiply(den.modInverse(MODB)).mod(MODB);
			X[i] = curr.longValue();
			num = num.add(BigInteger.ONE);
			den = den.add(BigInteger.ONE);
		}
		
		int[] A = new int[N];
		for (int i = 0; i < N; i++) A[i] = in.nextInt();
		
		//int[] Y = new int[N];
		for (int i = 0; i < N; i++) {
			int r = 0;
			for (int j = 0; j <= i; j++) {
				r += (X[i-j] * A[j]) % MOD;
				if (r >= MOD) r -= MOD;
			}
			out.print(r + " ");
		}
		
		
		
		out.flush();
		out.close();
	}
	
	private static class Reader {
	    BufferedReader reader;
	    StringTokenizer tokenizer;

	    /** call this method to initialize reader for InputStream */
	    Reader(InputStream input) {
	        reader = new BufferedReader(
	                     new InputStreamReader(input) );
	        tokenizer = new StringTokenizer("");
	    }

	    /** get next word */
	    public String next() throws IOException {
	        while ( ! tokenizer.hasMoreTokens() ) {
	            //TODO add check for eof if necessary
	            tokenizer = new StringTokenizer(
	                   reader.readLine() );
	        }
	        return tokenizer.nextToken();
	    }

	    public int nextInt() throws IOException {
	        return Integer.parseInt( next() );
	    }
		
	    public double nextDouble() throws IOException {
	        return Double.parseDouble( next() );
	    }
	    
	    public long nextLong() throws IOException {
	    	return Long.parseLong(next());
	    }
	    
	}
}
