import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Test_1874 {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int count = Integer.parseInt(br.readLine());
int[] stack = new int[count];
int index = 0;
int highest = 0;
for( int c = 0 ; c < count ; c++) {
int num = Integer.parseInt(br.readLine());
if(num > highest) {
for(int i = highest+1; i <= num; i++) {
stack[index++] = i;
sb.append('+').append('\n');
}
highest = num;
}
else if(num != stack[index - 1]) {
System.out.println("NO");
return ;
}
index--;
sb.append('-').append('\n');
}
System.out.println(sb);
}
}