Print all integer sequences of length $N$ that satisfy the following conditions, in ascending lexicographical order.
* The $i$\-th element is between $1$ and $R_i$, inclusive.
* The sum of all elements is a multiple of $K$.
What is lexicographical order for sequences? A sequence $A = (A_1, \ldots, A_{|A|})$ is **lexicographically smaller** than $B = (B_1, \ldots, B_{|B|})$ if either 1. or 2. below holds:
1. $|A|<|B|$ and $(A_{1},\ldots,A_{|A|}) = (B_1,\ldots,B_{|A|})$.
2. There exists an integer $1\leq i\leq \min{|A|,|B|}$ such that both of the following are true:
* $(A_{1},\ldots,A_{i-1}) = (B_1,\ldots,B_{i-1})$
* $A_i < B_i$
## Constraints
* All input values are integers.
* $1 \le N \le 8$
* $2 \le K \le 10$
* $1 \le R_i \le 5$
## Input
The input is given from Standard Input in the following format:
$N$ $K$
$R_1$ $R_2$ $\dots$ $R_N$
[samples]