https://www.acmicpc.net/problem/1874
import sys
input = sys.stdin.readline
n = int(input())
goal = []
for _ in range(n):
goal.append(int(input()))
stack = []
result = []
goal_idx = 0
target = 1
NO_FLAG = False
while True:
# 종료 조건
if target > n:
# 정상 종료 조건
if len(stack) == 0:
break
# NO 종료 조건
elif stack[-1] != goal[goal_idx]:
NO_FLAG = True
break
if len(stack) == 0:
stack.append(target)
result.append('+')
target += 1
elif stack[-1] == goal[goal_idx]:
stack.pop()
result.append('-')
goal_idx += 1
else:
stack.append(target)
result.append('+')
target += 1
if NO_FLAG:
print("NO")
else:
for x in result:
print(x)