def solve():
	nn = int(input())
	wejscie = [int(i) for i in input().split()]
	for i in range(nn):
		if wejscie[i]>i:
			print("NIE")
			return
	tt = []
	for i in range(nn):
		tt.insert(i-wejscie[i], i)
	odp = [0]*nn
	for i in range(nn):
		odp[tt[i]] = i
	print(' '.join(str(i+1) for i in odp))

if __name__=="__main__":
	solve()
