#include <bits/stdc++.h>
using namespace std;
struct segtree {
  int A[100005], tree[444444], N;
  void init(int x) {
    N = x;
    for (int i = 1; i <= N * 4; i++) tree[i] = 1e9;
  }
  void update(int x, int y) {
    A[x] = y;
    update(1, 1, N, x, y);
  }
  void update(int node, int s, int e, int idx, int x) {
    if (idx < s || e < idx) return;
    tree[node] = x;
    if (s < e)
      update(node + node, s, (s + e) >> 1, idx, x),
          update(node + node + 1, ((s + e) >> 1) + 1, e, idx, x);
    if (s < e) tree[node] = min(tree[node * 2], tree[node * 2 + 1]);
  }
  int RMQ(int node, int s, int e, int l, int r) {
    if (r < s || e < l) return int(1e9);
    if (l <= s && e <= r) return tree[node];
    return min(RMQ(node + node, s, (s + e) >> 1, l, r),
               RMQ(node + node + 1, ((s + e) >> 1) + 1, e, l, r));
  }
} seg;
int N, ans[100005], rev[100005];
stack<int> s;
set<int> se;
int E[200005], F[200005];
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) se.insert(i);
  int idx = 0;
  for (int i = 1; i <= N * 2; i++) {
    char x;
    int y;
    scanf(" %c", &x);
    if (x == '+') {
      s.push(++idx);
    } else {
      scanf("%d", &y);
      if (s.empty()) return puts("NO"), 0;
      ans[s.top()] = y;
      rev[y] = s.top();
      s.pop();
    }
    E[i] = (x == '+');
    F[i] = (E[i] ? idx : y);
  }
  seg.init(N);
  idx = 0;
  for (int i = 1; i <= N * 2; i++) {
    if (E[i] == 1)
      seg.update(idx + 1, ans[idx + 1]), ++idx;
    else {
      int q = seg.RMQ(1, 1, N, 1, idx);
      if (q != F[i]) return puts("NO"), 0;
      seg.update(rev[q], N + 1);
    }
  }
  puts("YES");
  for (int i = 1; i <= N; i++) printf("%d ", ans[i]);
}
