#include <bits/stdc++.h>
using namespace std;
char c[500010];
int a[500010], ans[500010];
struct LCT {
  int f[20202], px[20202], py[20202];
  int find(int x) { return x == f[x] ? f[x] : f[x] = find(f[x]); }
  struct Tree {
    int son[2], fa, w, rev;
  } t[20202];
  bool isrt(int x) { return t[t[x].fa].son[0] != x && t[t[x].fa].son[1] != x; }
  void pushup(int x) { t[x].w = t[t[x].son[0]].w + t[t[x].son[1]].w + 1; }
  void pushdown(int x) {
    if (t[x].rev) {
      swap(t[x].son[0], t[x].son[1]);
      t[t[x].son[0]].rev ^= 1;
      t[t[x].son[1]].rev ^= 1;
      t[x].rev = 0;
    }
  }
  void push(int x) {
    if (!isrt(x)) push(t[x].fa);
    pushdown(x);
  }
  void rotate(int x) {
    int y = t[x].fa, z = t[y].fa;
    int l = t[y].son[1] == x, r = l ^ 1;
    if (!isrt(y)) t[z].son[t[z].son[1] == y] = x;
    t[x].fa = z;
    t[y].fa = x;
    t[t[x].son[r]].fa = y;
    t[y].son[l] = t[x].son[r];
    t[x].son[r] = y;
    pushup(y);
    pushup(x);
  }
  void splay(int x) {
    push(x);
    while (!isrt(x)) {
      int y = t[x].fa, z = t[y].fa;
      if (!isrt(y)) {
        if (t[z].son[0] == y ^ t[y].son[0] == x)
          rotate(x);
        else
          rotate(y);
      }
      rotate(x);
    }
  }
  void access(int x) {
    for (int pre = 0; x; pre = x, x = t[x].fa) {
      splay(x);
      t[x].son[1] = pre;
      pushup(x);
    }
  }
  void makert(int x) {
    access(x);
    splay(x);
    t[x].rev ^= 1;
  }
  int dis(int u, int v) {
    makert(u);
    access(v);
    splay(v);
    return t[v].w;
  }
  void link(int u, int v) {
    int fx = find(u), fy = find(v);
    if (fx != fy) {
      makert(u);
      t[u].fa = v;
      int a = 0, b, c;
      if (dis(px[fx], py[fx]) > a)
        a = dis(px[fx], py[fx]), b = px[fx], c = py[fx];
      if (dis(px[fy], py[fy]) > a)
        a = dis(px[fy], py[fy]), b = px[fy], c = py[fy];
      if (dis(px[fx], py[fy]) > a)
        a = dis(px[fx], py[fy]), b = px[fx], c = py[fy];
      if (dis(px[fx], px[fy]) > a)
        a = dis(px[fx], px[fy]), b = px[fx], c = px[fy];
      if (dis(py[fx], px[fy]) > a)
        a = dis(py[fx], px[fy]), b = py[fx], c = px[fy];
      if (dis(py[fx], py[fy]) > a)
        a = dis(py[fx], py[fy]), b = py[fx], c = py[fy];
      f[fx] = fy;
      px[fy] = b;
      py[fy] = c;
    }
  }
  int query(int u) {
    int x = find(u);
    return max(dis(px[x], u), dis(py[x], u));
  }
} lct;
stack<int> s;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
int main() {
  int n = read();
  lct.isrt(1);
  for (int i = 1; i <= 2 * n; i++) {
    cin >> c[i];
    if (c[i] == '-') cin >> a[i];
  }
  for (int i = 2 * n; i; i--) {
    if (c[i] == '-') {
      if (s.empty())
        s.push(a[i]);
      else if (s.top() <= a[i]) {
        puts("NO");
        return 0;
      } else
        s.push(a[i]);
    } else {
      if (s.empty()) {
        puts("NO");
        return 0;
      } else
        ans[i] = s.top(), s.pop();
    }
  }
  if (!s.empty()) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 1; i <= 2 * n; i++)
    if (ans[i]) cout << ans[i] << ' ';
}
