1413_D. Shurikens
Tenten runs a weapon shop for ninjas. Today she is willing to sell n shurikens which cost 1, 2, ..., n ryo (local currency). During a day, Tenten will place the shurikens onto the showcase, which is empty at the beginning of the day. Her job is fairly simple: sometimes Tenten places another shuriken (from the available shurikens) on the showcase, and sometimes a ninja comes in and buys a shuriken from the showcase. Since ninjas are thrifty, they always buy the cheapest shuriken from the showcase.

Tenten keeps a record for all events, and she ends up with a list of the following types of records:

  * + means that she placed another shuriken on the showcase; 
  * - x means that the shuriken of price x was bought. 



Today was a lucky day, and all shurikens were bought. Now Tenten wonders if her list is consistent, and what could be a possible order of placing the shurikens on the showcase. Help her to find this out!

Input

The first line contains the only integer n (1≤ n≤ 10^5) standing for the number of shurikens. 

The following 2n lines describe the events in the format described above. It's guaranteed that there are exactly n events of the first type, and each price from 1 to n occurs exactly once in the events of the second type.

Output

If the list is consistent, print "YES". Otherwise (that is, if the list is contradictory and there is no valid order of shurikens placement), print "NO".

In the first case the second line must contain n space-separated integers denoting the prices of shurikens in order they were placed. If there are multiple answers, print any.

Examples

Input


4
+
+
- 2
+
- 3
+
- 1
- 4


Output


YES
4 2 3 1 


Input


1
- 1
+


Output


NO


Input


3
+
+
+
- 2
- 1
- 3


Output


NO

Note

In the first example Tenten first placed shurikens with prices 4 and 2. After this a customer came in and bought the cheapest shuriken which costed 2. Next, Tenten added a shuriken with price 3 on the showcase to the already placed 4-ryo. Then a new customer bought this 3-ryo shuriken. After this she added a 1-ryo shuriken. Finally, the last two customers bought shurikens 1 and 4, respectively. Note that the order [2, 4, 3, 1] is also valid.

In the second example the first customer bought a shuriken before anything was placed, which is clearly impossible.

In the third example Tenten put all her shurikens onto the showcase, after which a customer came in and bought a shuriken with price 2. This is impossible since the shuriken was not the cheapest, we know that the 1-ryo shuriken was also there.
```python
import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write(' '.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
#from decimal import Decimal
#from fractions import Fraction
#sys.setrecursionlimit(100000)
INF = 10**9
mod = int(1e9)+7


def construct(BIT,arr):
    for i in range(len(arr)):
        BIT[i+1]=arr[i]

def updateBIT(BIT,v, w):
    while v <= n:
        BIT[v] += w
        v += (v & (-v))


def getvalue(BIT,v):
    ANS = 0
    while v != 0:
        ANS += BIT[v]
        v -= (v & (-v))
    return ANS


def bisect_on_BIT(BIT,x):
    if x <= 0:
        return 0
    ANS = 0
    h = 1 << (n - 1)
    while h > 0:
        if ANS + h <= n and BIT[ANS + h] < x:
            x -= BIT[ANS + h]
            ANS += h
        h //= 2
    return ANS + 1


def update(BIT, l, r, n, val):
    updateBIT(BIT, l, val)
    updateBIT(BIT, r + 1, -val)


n=int(input())
BIT = [0]*(n+1)
stack=[]
ans=[0]*n
cnt=0
a=[data().split() for i in range(2*n)]
for i in range(2*n):
    if a[i][0]=='+':
        stack.append([cnt,0])
        cnt+=1
    else:
        x=int(a[i][1])
        if stack and (n-x)-(getvalue(BIT,n)-getvalue(BIT,x))>=len(stack)-1 and stack[-1][1]<x:
            p,q=stack.pop()
            ans[p]=x
            updateBIT(BIT,x,1)
            if stack:
                stack[-1][1]=max(stack[-1][1],q,x)
        else:
            out("NO")
            exit()
if stack:
    out("NO")
    exit()
out("YES")
outl(ans)
```