#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long n, m, rt, cnt, a[N], size[N], val[N], rd[N], xjh[N], ch[N][2], Ans[N];
vector<long long> g;
char s[N];
priority_queue<long long, vector<long long>, greater<long long> > q;
inline long long read() {
  long long ret = 0, f = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (isdigit(c)) {
    ret = ret * 10 + c - 48;
    c = getchar();
  }
  if (f) return -ret;
  return ret;
}
long long newnode(long long x, long long y) {
  cnt++;
  val[cnt] = x;
  xjh[cnt] = y;
  size[cnt] = 1;
  rd[cnt] = 1ll * rand() * rand() % 998244353;
  return cnt;
}
void pushup(long long x) { size[x] = size[ch[x][0]] + size[ch[x][1]] + 1; }
long long merge(long long x, long long y) {
  if (!x) return y;
  if (!y) return x;
  if (rd[x] < rd[y]) {
    ch[x][1] = merge(ch[x][1], y);
    pushup(x);
    return x;
  } else {
    ch[y][0] = merge(x, ch[y][0]);
    pushup(y);
    return y;
  }
}
void split(long long u, long long k, long long &x, long long &y) {
  if (!u) {
    x = y = 0;
    return;
  }
  if (val[u] <= k) {
    x = u;
    split(ch[u][1], k, ch[u][1], y);
  } else {
    y = u;
    split(ch[u][0], k, x, ch[u][0]);
  }
  pushup(u);
}
long long kth(long long u, long long k) {
  while (true) {
    if (k == size[ch[u][0]] + 1) return u;
    if (k <= size[ch[u][0]])
      u = ch[u][0];
    else {
      k -= size[ch[u][0]] + 1;
      u = ch[u][1];
    }
  }
}
signed main() {
  srand(time(0));
  n = read();
  m = 2 * n;
  for (long long i = 1; i <= m; i++) {
    scanf("%s", s);
    if (s[0] == '-')
      a[i] = read();
    else
      a[i] = -1;
  }
  for (long long i = m; i; i--) {
    if (a[i] == -1) {
      if (q.empty()) {
        puts("NO");
        return 0;
      }
      g.push_back(q.top());
      q.pop();
    } else {
      if (q.size() > 0 && q.top() < a[i]) {
        puts("NO");
        return 0;
      }
      q.push(a[i]);
    }
  }
  puts("YES");
  for (long long i = g.size() - 1; i >= 0; i--) printf("%lld ", g[i]);
  return 0;
}
