#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> a(n * 2);
  vector<int> num(n + 1);
  set<pair<int, int>> plus;
  int cnt = 1;
  for (int i = 0; i < n * 2; ++i) {
    char c;
    int x;
    cin >> c;
    if (c == '+') {
      a[i] = {1, 0};
      plus.insert({i, cnt});
      cnt++;
    } else {
      cin >> x;
      num[x] = i;
      a[i] = {0, x};
    }
  }
  vector<int> plus_v(n + 1, -1);
  bool o = true;
  for (int i = 1; i <= n; ++i) {
    int y = num[i];
    auto buf = plus.upper_bound({y, 0});
    if (buf == plus.begin()) {
      o = false;
      break;
    }
    int pred_near_plus = (*(--buf)).second;
    plus.erase(buf--);
    plus_v[pred_near_plus] = i;
  }
  if (o) {
    set<int> cost;
    int cnt = 1;
    for (int i = 0; i < n * 2; ++i) {
      if (a[i].first == 1) {
        if (plus_v[cnt] == -1) {
          o = false;
          break;
        }
        cost.insert(plus_v[cnt]);
        cnt++;
      } else {
        if (cost.size() == 0) {
          o = false;
          break;
        }
        int y = *cost.begin();
        cost.erase(cost.begin());
        if (a[i].second != y) {
          o = false;
          break;
        }
      }
    }
  }
  if (o) {
    cout << "YES\n";
    for (int i = 1; i <= n; ++i) {
      cout << plus_v[i] << " ";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
