#include <bits/stdc++.h>
using namespace std;
const int N = 112345;
int resp[N];
int main() {
  int n;
  scanf("%d", &n);
  int cur = 0;
  stack<int> s;
  vector<pair<int, int>> events(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    char c;
    scanf(" %c", &c);
    if (c == '+') {
      events[i] = {0, cur};
      s.push(cur++);
    } else {
      int x;
      scanf("%d", &x);
      events[i] = {1, x};
      if (s.size()) {
        resp[s.top()] = x;
        s.pop();
      } else {
        printf("NO\n");
        return 0;
      }
    }
  }
  cur = 0;
  set<int> all;
  for (auto ev : events) {
    if (ev.first == 0) {
      all.insert(resp[ev.second]);
    } else {
      int x = *all.begin();
      all.erase(all.begin());
      if (x != ev.second) {
        printf("NO\n");
        return 0;
      }
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%d ", resp[i]);
  }
  printf("\n");
}
