#D1892. Shuffle 2
Shuffle 2
Shuffle 2
Problem
There is a bundle of cards, with written on the th card from the bottom. Shuffle this bundle as defined below times.
- When looking at the bundle from below, consider a bundle made by stacking odd-numbered cards on top, and a bundle made by stacking even-numbered cards on top. Then do whatever you like out of the following .
- Operation : Put the bundle on the bundle to make a bundle of .
- Operation : Put the bundle on the bundle to make a bundle of .
For example, if you consider shuffling times for a bundle of cards (123456 from the bottom), the bundle you get when you perform the operation is ~~ 246135 ~~ from the bottom. 135246, the bundle obtained by performing the operation is ~~ 135246 ~~ 246135 from the bottom. (Corrected at 14:52)
After shuffle, I want the card with to be th from the bottom of the bunch. If possible, print of shuffle operations in sequence, and if not, print .
Constraints
The input satisfies the following conditions.
- is even
Input
The input is given in the following format.
Output
If it is possible to shuffle the conditions, output the shuffle operation on the line.
If not possible, output .
Examples
Input
4 2 1 1
Output
0 0
Input
4 2 3 1
Output
0 1
Input
4 1 1 4
Output
-1
Input
7834164883628 15 2189823423122 5771212644938
Output
0 1 1 1 1 1 0 1 0 1 0 0 0 0 0
inputFormat
input satisfies the following conditions.
- is even
Input
The input is given in the following format.
outputFormat
Output
If it is possible to shuffle the conditions, output the shuffle operation on the line.
If not possible, output .
Examples
Input
4 2 1 1
Output
0 0
Input
4 2 3 1
Output
0 1
Input
4 1 1 4
Output
-1
Input
7834164883628 15 2189823423122 5771212644938
Output
0 1 1 1 1 1 0 1 0 1 0 0 0 0 0
样例
4 2 3 1
0
1
</p>