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.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
        new Solve().run();
    }
}

class Solve {

    InputStream is;
    PrintWriter out;
    String INPUT = "";
    int mod = 1000000007;
    //------------> Solution 

    HashMap<Long, Long> list = new HashMap<>();

    public void solve() {
        int n = nextInt();
        int k = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
            long sum = 0;
            if (k != 0) {
                for (int j = 0; j <= i; j++) {
                    if (a[i - j] != 0) {
                        sum += a[i - j] * hamso(k, j + 1) % mod;
                    }
                }
            } else {
                sum = a[i];
            }
            sout(sum % mod + " ");
        }
    }

    HashMap<Long, BigInteger> map = new HashMap<>();

    public long hamso(int k, long x) {
        if (list.containsKey(x)) {
            return list.get(x);
        }
        BigInteger ansB = new BigInteger("1");
        BigInteger modB = new BigInteger(String.valueOf(mod));
        if (x == 1) {
            map.put(x, ansB);
        } else {
            ansB = map.get(x - 1);
            BigInteger iB = new BigInteger(String.valueOf(x - 1));
            BigInteger kB = new BigInteger(String.valueOf(k - 1)).add(iB);
            ansB = ansB.multiply(kB.multiply(iB.modInverse(modB))).mod(modB);
            map.put(x, ansB);
        }
        long ans = ansB.longValue();
        list.put(x, ans);
        return ans;
    }

    //End !!!
    void run() throws Exception {
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);
        long s = System.currentTimeMillis();
        solve();
        out.flush();
        if (!INPUT.isEmpty()) {
            print(System.currentTimeMillis() - s + "ms");
        }
    }

    private final byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private void sout(Object s) {
        out.print(s);
    }

    private int readByte() {
        if (lenbuf == -1) {
            throw new InputMismatchException();
        }
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) {
                return -1;
            }
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) {
        }
        return b;
    }

    private double nextDouble() {
        return Double.parseDouble(nextString());
    }

    private char nextChar() {
        return (char) skip();
    }

    private String nextString() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] nextString(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) {
            map[i] = nextString(m);
        }
        return map;
    }

    private int[] nextArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    private int nextInt() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nextLong() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private void print(Object... o) {
        if (INPUT.length() > 0) {
            System.out.println(Arrays.deepToString(o));
        }
    }

}
