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 Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();
    }

    static class Solver {
        private final int MOD = (int) 1e9 + 7;

        private int Power(int a, int k) {
            int ans = 1;
            while (k > 0) {
                if (k % 2 == 1) {
                    ans = (int) ((long) ans * a % MOD);
                }
                a = (int) ((long) a * a % MOD);
                k >>= 1;
            }
            return ans;
        }

        private void solve(InputReader inp, PrintWriter out) {
            int n = inp.nextInt();
            int k = inp.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; ++i) {
                a[i] = inp.nextInt();
            }
            if (k == 0) {
                for (int i = 0; i < n; ++i) {
                    out.print(a[i]);
                    out.print(' ');
                }
                out.println();
                return;
            }

            int[][] C = new int[n + 1][n + 1];
            for (int i = 0; i <= n; ++i) {
                C[i][0] = 1;
                for (int j = 1; j <= i; ++j) {
                    C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
                    if (C[i][j] >= MOD) {
                        C[i][j] -= MOD;
                    }
                }
            }

            int[] coef = new int[n];
            // Compute C(k - 1 + i, i) = (k - 1 + i)! / (k - 1)! / i! = k(k+1)..(k-1+i) / i!
            coef[0] = 1;
            for (int i = 1; i < n; ++i) {
                long tmp = (long) coef[i - 1] * (k - 1 + i) % MOD;
                tmp = tmp * Power(i, MOD - 2) % MOD;
                coef[i] = (int) tmp;
            }

            for (int i = 0; i < n; ++i) {
                long ans = 0;
                for (int j = 0; j <= i; ++j) {
                    ans = (ans + (long) coef[i - j] * a[j]) % MOD;
                }
                out.print(ans);
                out.print(' ');
            }
            out.println();
        }
    }

    /*
        1, 0, 0, 0
        1, 1, 1, 1
        1, 2, 3, 4
        1, 3, 6, 10
        1, 4, 10, 20
        1, 5, 15, 35
        1, 6,
     */

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}
