For each test case, if it is impossible to merge all stones in one pile, output ''-1''(without quotes).
Otherwise, on the first line, output the number of operations $L$ ($0\le L \le n$).
We assign a unique ID to each pile. The IDs of the initial piles are $1,2, \dots n$. The two piles possibly created by the $i$\-th operation have the ID $n + 2\cdot i - 1$ and $n + 2\cdot i$. Let $m_{i}$ be the number of piles merged in the $i$\-th operation. The pile with ID $n+2\cdot i - 1$ contains all stones with number $m_{i}$ written on it, and the pile with ID $n + 2\cdot i$ contains the remaining stones. Note that one of the piles may be empty, but we still assign an ID for it. Also, if the pile with ID $n + 2\cdot i - 1$ is not empty, which means machine $m$ will be broken after this operation, and you can never use it again.
For each operation, output it in a single line. First output $m_{i}$ ($2\le m_{i} \le k$), the number of piles that need to be merged. Then followed by $m_{i}$ distinct integers $c_{1},c_{2} \dots c_{m_{i}}$, each of them denoting a **non-empty** pile. This represents merging piles with ID $c_{1},c_{2} \dots c_{m_{i}}$, and creates two new piles with ID $n+2\cdot i - 1$, $n+2\cdot i$. After this operation, piles with ID $c_{1},c_{2} \dots c_{m_{i}}$ become empty. You should make sure that the machine $m_i$ is not broken before this operation.
After all the operations, you should make sure there is only one non-empty pile, which contains all $n$ stones.
In a single test case, you should make sure that $\sum{ m_{i}} \le 3 \cdot n$.