#include <bits/stdc++.h>
using namespace std;
const int maxl = 3e5 + 10;
int n, m, cnt, tot, cas, ans;
int a[maxl], s[maxl], b[maxl], c[maxl];
int mx[maxl];
deque<int> q;
bool vis[maxl];
char ch[2];
inline void upd(int i, int x) {
  while (i <= n) {
    b[i] = max(b[i], x);
    i += i & -i;
  }
}
inline int premx(int i) {
  int ret = 0;
  while (i) {
    ret = max(b[i], ret);
    i -= i & -i;
  }
  return ret;
}
inline void prework() { scanf("%d", &n); }
inline void mainwork() {
  ans = 1;
  int x, cnt = 0, hd = 1, tl = 0, top = 0;
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%s", ch);
    if (ch[0] == '-') {
      scanf("%d", &x);
      if (top == 0 || (x < mx[s[top]] && mx[s[top]] != 0)) {
        ans = 0;
        return;
      }
      c[s[top]] = x;
      mx[s[top]] = max(mx[s[top]], x);
      if (top > 1) mx[s[top - 1]] = max(mx[s[top - 1]], mx[s[top]]);
      top--;
    } else
      s[++top] = ++cnt;
  }
}
inline void print() {
  if (!ans)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d%c", c[i], " \n"[i == n]);
  }
}
int main() {
  int t = 1;
  for (cas = 1; cas <= t; cas++) {
    prework();
    mainwork();
    print();
  }
  return 0;
}
