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.
import java.io.*;
import java.util.*;

public class A {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] ans = new int[n];
		int[] prefix = new int[n];
		int []queries=new int [2*n];
		int curr = 0;
		for (int i = 0; i < 2 * n; i++) {
			if (sc.next().charAt(0) == '+') {
				curr++;
				queries[i]=-1;
			}
			else {
				int x=sc.nextInt();
				queries[i]=x;
				x--;
				prefix[x] = curr;
			}
		}

		FenwickTree ft = new FenwickTree(n);
		for (int i = 0; i < n; i++) {
			int idx = ft.findLast(prefix[i]);
			if (idx == -1) {
				System.out.println("NO");
				return;
			}
			ans[idx] = i + 1;
			ft.update(idx, 1);
		}
		PriorityQueue<Integer>pq=new PriorityQueue<>();
		boolean ok=true;
		for(int i=0,j=0;i<2*n;i++ ) {
			if(queries[i]==-1)
				pq.add(ans[j++]);
			else if(pq.isEmpty())
				ok=false;
			else
				ok&=pq.poll()==queries[i];
				
		}
		if(ok) {
			out.println("YES");
			for (int x : ans)
				out.print(x + " ");
		}
		else
			out.println("NO");


		out.close();

	}

	static class FenwickTree {
		int[] bit;

		int findLast(int x) {
			int lo = 0, hi = x - 1;
			if (x == 0 || query(lo, hi) == hi - lo + 1)
				return -1;
			int ans = -1;
			while (lo <= hi) {
				int mid = lo + hi >> 1;
				if (query(mid, hi) == hi - mid + 1)
					hi = mid - 1;
				else {
					ans = mid;
					lo = mid + 1;
				}
			}
			return ans;

		}

		FenwickTree(int n) {
			bit = new int[n + 1];
		}

		void update(int idx, int v) {
			idx++;
			while (idx < bit.length) {
				bit[idx] += v;
				idx += idx & -idx;
			}
		}

		int query(int idx) {
			idx++;
			int ans = 0;
			while (idx > 0) {
				ans += bit[idx];
				idx -= idx & -idx;
			}
			return ans;
		}

		int query(int l, int r) {
			return query(r) - query(l - 1);
		}
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		Scanner(String fileName) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(fileName));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		String nextLine() throws IOException {
			return br.readLine();
		}

		int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}

		boolean ready() throws IOException {
			return br.ready() || st.hasMoreTokens();
		}

		int[] nxtArr(int n) throws IOException {
			int[] ans = new int[n];
			for (int i = 0; i < n; i++)
				ans[i] = nextInt();
			return ans;
		}

	}

	static void sort(int[] a) {
		shuffle(a);
		Arrays.sort(a);
	}

	static void shuffle(int[] a) {
		int n = a.length;
		Random rand = new Random();
		for (int i = 0; i < n; i++) {
			int tmpIdx = rand.nextInt(n);
			int tmp = a[i];
			a[i] = a[tmpIdx];
			a[tmpIdx] = tmp;
		}
	}

}