Alyona is an expert in quantum physics. One day she decided to generalize the famous experiment with a cat and a box to $$$n$$$ cats and $$$n$$$ boxes. To do this, Alyona needs to conduct $$$n$$$ experiments. For convenience, she numbered all the cats, all the boxes, and all the experiments with numbers from 1 to $$$n$$$.
In each experiment, there must be exactly one cat in each box. To avoid any inaccuracies related to some cats' biases towards certain boxes, each cat must visit each box exactly once over all $$$n$$$ experiments. Moreover, for additional control, Alyona plans to monitor one of the boxes and the corresponding cat in it during each experiment. In the $$$i$$$-th experiment, she intends to observe the $$$i$$$-th box and wants the $$$i$$$-th cat to be in it at that moment, to ensure that over all $$$n$$$ experiments, Alyona will observe each box and each cat exactly once.
Help Alyona find a possible arrangement of cats in boxes for each experiment, if it exists.
The input consists of one natural number $$$n$$$ ($$$1 \leq n \leq 300$$$) — the number of cats, boxes, and experiments.
If the arrangement exists, output a table of size $$$n$$$ by $$$n$$$, where the value in the $$$i$$$-th row and $$$j$$$-th column will contain the number of the cat that should be in the $$$j$$$-th box during the $$$i$$$-th experiment.
If the arrangement does not exist, output the integer $$$-1$$$.
1
1
2
-1
3
1 3 2 3 2 1 2 1 3
No cats were harmed during the experiments.