Nils, Canada's most popular interior designer, has been tasked with selecting aesthetically pleasing potted plants!
There are
- The display of plants is symmetrical, that is, the sequence of plants is palindromic.
- For visual appeal, no two different contiguous sections of pots should contain identical sequences of plants, with both sequences containing more than one plant. Formally, every contiguous subsequence of the plants with a length greater than
should be unique.
Nils will be paid more for selecting a greater number of plants, so he wishes to maximise the value of
Can you help him find an optimal selection of plants?
Constraints
Subtask 1 [40%]
Subtask 2 [60%]
No additional constraints.
Input Specification
The only line contains a single integer,
Output Specification
Output
Sample Input
2
Sample Output
1 2 2 1
Explanation
This sequence has
Comments