#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void ckmx(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void ckmi(T &x, T y) {
  x = min(x, y);
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  x *= f;
}
int stk[100010];
int cnt[100010];
set<int> st[100010];
int p[100010];
int ans[100010];
int n, top;
set<int>::iterator it;
void mg(int bt, int t) {
  for (it = st[bt].begin(); it != st[bt].end(); ++it) st[t].insert(*it);
  st[bt].clear();
}
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) p[i] = i;
  int nw = 0;
  for (int i = 1; i <= n + n; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      stk[++top] = 0;
      cnt[top] = 1;
      ++nw;
      st[p[top]].insert(nw);
    } else {
      int x;
      read(x);
      if (top == 0 || stk[top] > x) {
        puts("NO");
        return 0;
      }
      cnt[top]--;
      ans[*st[p[top]].begin()] = x;
      st[p[top]].erase(st[p[top]].begin());
      if (!cnt[top]) top--;
      int nct = 0, ft = top, mci = top;
      while (top && stk[top] < x)
        mci = (cnt[top] > cnt[mci]) ? top : mci, nct += cnt[top], --top;
      if (nct) {
        stk[++top] = x;
        cnt[top] = nct;
        swap(p[top], p[mci]);
        for (int i = top + 1; i <= ft; ++i) mg(p[i], p[top]);
      }
    }
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
