Breaking the Hash Function#1797

Breaking the Hash Function

2 seconds
64 megabytes
Very easy

In some information security problems, so-called hash functions are used. One of the most important classes of hash functions is the so-called polynomial hash functions.

Suppose a string S = s_1 s_2 \ldots s_l consisting of digits from to is given. The value of the polynomial hash function p(S, x, m) is computed as follows:

(a \mod b denotes the remainder of the division of by ). For example, let S = 0123, then p(S, 2, 5) = (0 \cdot 1 + 1 \cdot 2 + 2 \cdot 4 + 3 \cdot 8) \mod 5 = 4.

One of the applications of hash functions is storing passwords. Often, passwords have to be stored in an unsecured database table, so instead of storing the passwords themselves, their hash values are stored. When a password is checked, the hash value of the entered string is computed and compared to the value stored in the table.

Your task is: given , , , and , find a string consisting of digits from to of length such that the value of its polynomial hash function p(S, x, m) is equal to .

Input

The input contains four integers: ( is a prime number, 5 \leq x \leq 100), ( is a power of two, 1 \leq m \leq 256), (10 \leq L \leq 100), and (0 \leq v \leq m-1).

Output

Output the found string or NO SOLUTION if such a string does not exist.

Examples

Example 1

Loading
Loading