
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Stack;
public class Solution {
public static void main(String[] args) {
Stack<Integer> stack = new Stack<>();
ArrayList<Character> out = new ArrayList<>();
int index = 0;
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] arr = new int[N];
for (int i = 0; i < N; i++) {
arr[i] = sc.nextInt();
}
for (int j = 1; j <= N; j++) {
stack.push(j);
out.add('+');
while (!stack.empty() && stack.peek() == arr[index]) {
stack.pop();
out.add('-');
index++;
}
}
if (stack.empty()) {
for (Character c : out) System.out.println(c);
} else{
System.out.println("NO");
}
}
}