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.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.InputStream;

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

class TaskE {
    private static final int MOD = 1000000007;

    public void solve(int testNumber, StreamInputReader in, PrintWriter out) {
        int N = in.readInt();
        int K = in.readInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = in.readInt();

        int[] B = new int[N];
        B[0] = 1;

        if(K > 0)
            for(int i = 1; i < N; i++) {
                B[i] = (int) (B[i - 1] * (long)(K + i - 1) % MOD * invmod(i) % MOD);
            }

        A = mult(A, B);

        for(int i = 0; i < N; i++)
            out.print(A[i] + " ");
	}

    private long invmod(long x) {
        int p = MOD - 2;
        long r = 1;
        while(p > 0) {
            if((p & 1) > 0)
                r = (r * x) % MOD;
            x = (x * x) % MOD;
            p /= 2;
        }
        return r;
    }

    private int[] mult(int[] A, int[] B) {
        int[] C = new int[A.length];
        for(int i = 0; i < C.length; i++) {
            long crt = 0;
            for(int j = 0; j <= i; j++) {
                crt += ((long)A[j] * B[i - j]);
                if(crt > 6e18)
                    crt = crt % MOD;
            }
            C[i] = (int) (crt % MOD);
        }
        return C;
    }
}

class StreamInputReader extends InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar, numChars;

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

    public 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++];
    }

    }

abstract class InputReader {

    public abstract int read();

    public int readInt() {
        return Integer.parseInt(readString());
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

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

    }

