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.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Crash
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
	private static final int modulo = 1000000007;
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();
		int[] a = in.readIntArray(n);
		int[] b = new int[n];
		b[0] = a[0];
		for (int i = 1; i < n; i ++)
			b[i] = a[i] - a[i - 1];
		long[] rev = new long[n + 1];
		for (int i = 1; i <= n; i ++)
			rev[i] = NumberTheory.getPower(i, modulo - 2, modulo);
		long[] ans = new long[n];
		Arrays.fill(ans, 0);
		for (int i = 0; i < n; i ++) {
			long binom = 1;
			for (int j = 0; j < n - i; j ++) {
				ans[i + j] = (ans[i + j] + binom * b[i]) % modulo;
				binom = binom * (k + j + 1) % modulo;
				binom = binom * rev[j + 1] % modulo;
			}
		}
		for (int i = 0; i < n; i ++) ans[i] = (ans[i] + modulo) % modulo;
		out.printLongArray(ans);
		out.printLine();
	}
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1000];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	private int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public int[] readIntArray(int length) {
		int[] res = new int[length];
		for (int i = 0; i < length; i ++) res[i] = readInt();
		return res;
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void printLongArray(long[] data) {
		for (int i = 0; i < data.length; i ++)
			if (i < data.length - 1) {
				print(data[i] + " ");
			} else {
				print(data[i]);
			}
	}

	public void close() {
		writer.close();
	}
}

class NumberTheory {
	private NumberTheory() {
	}

	public static int getPower(int a, int p, int modulo) {
		if (p == 0) return 1;
		int res = getPower(a, p / 2, modulo);
		res = (int)((long)res * res % modulo);
		if (p % 2 == 1) res = (int)((long)res * a % modulo);
		return res;
	}

	}

