#include <bits/stdc++.h>
int read() {
  static int c, x;
  while ((c = getchar()) < 48) {
  }
  x = c & 15;
  while ((c = getchar()) >= 48) x = x * 10 + (c & 15);
  return x;
}
int readalpha() {
  static int c;
  while ((c = getchar()) <= 32) {
  }
  return c;
}
int ans[100010], tag[100010], stk[100010];
int main() {
  const int n = read(), N = n << 1;
  int top = 0;
  for (int i = 1, cnt = 0; i <= N; ++i) {
    if (readalpha() == '+') {
      stk[++top] = ++cnt;
    } else {
      const int x = read();
      if (!top || x < tag[stk[top]]) {
        puts("NO");
        return 0;
      }
      ans[stk[top--]] = x;
      tag[stk[top]] = std::max(tag[stk[top]], x);
    }
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  return 0;
}
