404385: GYM101492 B Building a Bianzhong

Memory Limit:512 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Building a Bianzhongtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard output

The Bianzhong is one of the most distinctive musical instruments of ancient Chinese culture. It is made of bronze bells hanging from a wooden frame, and they are struck by a mallet. The Bianzhong, along with other instruments, was an important part of many Chinese rituals from yore.

The Bianzhong bells (or zhong bells) have two distinguishing characteristics when compared to regular bells. The mouth is elliptic (rather than circular), which allows the bell to produce two different musical tones (represented by the characters ' + ' and ' - '), depending on where it is struck. Its use at concerts has been getting more and more common.

The company IME (Esoteric Musical Instruments, in Portuguese) acquired at an auction a set of N zhong bells of distinct sizes. Now they want to build a Bianzhong from these bells. But the bells purchased have the following oddity: the i-th bell has a sound power of value i, for i = 1, 2, ..., N. The wooden frame for the bells was already built. The final step to complete the Bianzhong is to determine for each bell which of the musical tones it should play.

IME would like to have a Bianzhong with a balanced configuration, that is, the total sound power of bells with musical tone ' + ' should equal the total sound power of bells with musical tone ' - '. The total sound power of a set of bells is the sum of the sound powers of the bells in the set. IME would like to count on your help to find a balanced solution, and thus complete setting up its Bianzhong.

Input

The input has a single integer N, the number of bells acquired by IME.

  • 1 ≤ N ≤ 106
Output

If it is not possible to find a balanced bell configuration, print "-1" (without the double quotes). Otherwise, the output should have a line with N characters s1, ..., sN, where si is the musical tone of the i-th bell (' + ' or ' - '). If more than one configuration is possible, print any one of them.

ExamplesInput
4
Output
-++-
Input
5
Output
-1

Source/Category

加入题单

算法标签: