Angry Teacher

No attempts yetTime limit1sMemory limit128 MB

Problem

Mr. O'Cruel teaches Math to ninth-grade students. Students are usually lazy and dislike doing their homework, and Mr. O'Cruel dislikes lazy students.

Andrew failed to do his homework again, so he was given a special task. If he does not finish it, he will be expelled from school. The task looks easy, but it is very tedious and takes a lot of time.

Andrew is given a polynomial p(x)=anxn+an1xn1++a1x+a0p(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0 with integer coefficients. He must evaluate the polynomial for kk consecutive integers starting from ll. Writing down all of these values would take far too much paper, so as proof that he completed the task, for each xx from ll to l+k1l + k - 1 Andrew must report the sum of the squares of the last mm digits of p(x)p(x) in decimal notation.

If p(x)p(x) has fewer than mm digits, treat the missing higher-order digits as zeros (their squares add nothing to the sum).

Since Andrew is lazy and does not want to do this himself, write the program that computes the requested values for him.

Input

The first line contains nn, ll, kk, and mm (0n100 \le n \le 10, 0l1010000 \le l \le 10^{1000}, 1k10001 \le k \le 1000, 1m10001 \le m \le 1000).

The next n+1n + 1 lines contain the coefficients of the polynomial an,an1,,a1,a0a_n, a_{n-1}, \ldots, a_1, a_0, one per line (0ai1010000 \le a_i \le 10^{1000}).

Output

Output kk lines. For xx from ll to l+k1l + k - 1, output the sum of the squares of the last mm digits of p(x)p(x).