D - Raiders of the Lost Sign  

Background

For many many years, mathematicians all over the world have focused their attention on one of the most fascinating phenomenon of Maths: the relationship between the perimeter and the diameter of a circumference (p).

Using one of Euler's formulas, we can calculate p as an addition of infinite terms,

p = 1 + 1/2 + 1/3 + 1/4 - 1/5 + 1/6 + 1/7 + 1/8 + 1/9 - 1/10 + 1/11 + 1/12 - 1/13 +…

Some of these terms add on, and others subtract, according to the following rules,

For example, the term with denominator 3 has '+' because 3 is prime and 3 = 4×1 - 1. The term with denominator 13 has '-' because 13 is prime and 13 = 4×3 + 1. The term with denominator 6 has '+' because 6 = 2×3, and 2 and 3 have respectively '+'. And the term with denominator 10 has '-' because 10 = 2×5, and 2 has '+' and 5 has '-'. So, 50 is 5×5×2, i.e., - × - × + = +.

The Problem

We want to obtain the sign of the i-th term of the former Euler's formula, i.e., the sign of the term with denominator i.

The Input

The first line of the input contains an integer, t, indicating the number of test cases. For each test case, one line appears containing an integer i, 2 ≤ i 100000.

The Output

For each test case the output should contain a single line, indicanting the sign of the term 1/i of Euler’s formula (+ or -).

Sample Input

6
2
13
45
87
88
100000

Sample Output

+
-
-
-
+
-

OMP'14
Facultad de Informática
Universidad de Murcia