let n = Int(readLine()!)!
var current = 1
var stack = [Int]()
var answer = ""
for _ in 0..<n {
let input = Int(readLine()!)!
if input >= current {
while input >= current {
stack.append(current)
answer += "+\n"
current += 1
}
stack.removeLast()
answer += "-\n"
} else {
if stack.last! == input {
stack.removeLast()
answer += "-\n"
} else {
answer = "NO"
break
}
}
}
print(answer)