#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
int n, m;
int add[MAXN];
int ans[MAXN];
set<int> s;
char op[MAXN][5];
int num[MAXN];
void solve() {}
void init() {
  scanf("%d", &n);
  int addid = 0;
  int subid = 0;
  int nowaddnum = 0;
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%s", op[i]);
    if (op[i][0] == '-') {
      scanf("%d", num + i);
      if (nowaddnum <= 0) {
        printf("NO\n");
        return;
      }
      ans[add[nowaddnum]] = num[i];
      nowaddnum--;
    } else {
      nowaddnum++;
      addid++;
      add[nowaddnum] = addid;
    }
  }
  int now = 0;
  for (int i = 1; i <= 2 * n; i++) {
    if (op[i][0] == '-') {
      if (*s.begin() != num[i]) {
        printf("NO\n");
        return;
      }
      s.erase(s.begin());
    } else {
      now++;
      s.insert(ans[now]);
    }
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
}
int main() {
  int T = 1;
  while (T--) {
    init();
    solve();
  }
  return 0;
}
