N = int(input()) a = list(map(int,input().split())) l = [(a[i],i+1) for i in range(N)] ans = [0] * N l.sort() import sys for j in range(N): if l[j][0] > j+1: print('No') exit() else: ans[j] = j+2-l[j][0] for i in ans: print(i)