import sys
N = int(input())
highest = 1
answer = ''
stack = []
check = False
for i in range(N):
num = int(sys.stdin.readline())
while highest <= num:
stack.append(highest)
answer += '+\n'
highest+=1
if stack[-1] == num:
stack.pop()
answer += '-\n'
else:
check = True
if check:
print('NO')
else :
print (answer)
시간차이 뭥미..