Necklace
Time limit2sMemory limit512 MB
Arrange n pearls as a binary necklace with no reflection axis of symmetry, or print -1 when no such arrangement exists.
- Level
Medium5 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Octyabrina, a young jewelry lover, wants to give her best friend Traktorina a necklace of black and pink pearls for the November 4 holiday.
To keep the necklace from being boring, Octyabrina wants to arrange the pearls so that no matter how the necklace is rotated, its left half is not symmetric to its right half. More precisely, the necklace must have no axis of symmetry.
An axis of symmetry divides the necklace into contiguous parts with the same number of pearls. If the axis passes through a pearl, that pearl belongs to both parts. If the axis passes between two pearls, those two pearls lie in different parts. So the following necklaces have an axis of symmetry:

Your task is to help Octyabrina find the required arrangement of pearls.
Input
The only line of input contains one integer (), the required number of pearls in the necklace.
Output
If no such arrangement exists, print a single number . Otherwise, print integers describing the arrangement of the pearls. A pink pearl is encoded as , and a black pearl is encoded as .
Hint
The arrangement of pearls in the first example:
