#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long w = 0, f = 1;
  char c = ' ';
  while (c < '0' || c > '9') c = getchar(), f = c == '-' ? -1 : f;
  while (c >= '0' && c <= '9') w = w * 10 + c - 48, c = getchar();
  return w * f;
}
long long read01() {
  char c = getchar();
  while (c != '+' && c != '-') c = getchar();
  return c == '+';
}
long long n, a[200005], b[200005], now, ans[200005], s[200005];
bool f[200005];
signed main() {
  n = read();
  long long it = 0;
  for (long long i = 1; i <= n * 2; i++) {
    long long op = read01();
    if (op) {
      b[++it] = ++now;
      continue;
    }
    long long x = read();
    if (ans[b[it]] > x || !it || f[x]) {
      puts("NO");
      return 0;
    }
    f[x] = 1, ans[b[it]] = x, ans[b[it - 1]] = max(ans[b[it]], ans[b[it - 1]]),
    it--;
  }
  for (long long i = 1; i <= n; i++) s[ans[i]]++;
  s[n + 1] = 0;
  for (long long i = n; i > 0; i--) s[i] += s[i + 1];
  for (long long i = n; i > 0; i--)
    if (s[i] > n - i + 1) {
      puts("NO");
      return 0;
    }
  puts("YES");
  for (long long i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
