#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> ans;
vector<int> pos;
vector<int> tek;
void no() {
  cout << "NO\n";
  exit(0);
}
void read() {
  cin >> n;
  int total = 0;
  ans.assign(n, -1);
  int cnt1 = 0, cnt2 = 0;
  int minv = 1e9;
  for (int i = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '-') {
      int x;
      cin >> x;
      tek.push_back(x);
      if (x < minv) {
        minv = x;
        if (cnt1 == 0) no();
        cnt1--;
        cnt2 += cnt1;
        cnt1 = 0;
        ans[pos.back()] = x;
        pos.pop_back();
      } else {
        if (cnt2 == 0) {
          if (cnt1 == 0)
            no();
          else {
            cnt1--;
          }
        } else {
          cnt2--;
        }
        minv = x;
        cnt2 += cnt1;
        cnt1 = 0;
        ans[pos.back()] = x;
        pos.pop_back();
      }
    } else {
      tek.push_back(-1);
      pos.push_back(total);
      total++;
      cnt1++;
    }
  }
  total = 0;
  set<int> s;
  for (auto e : tek) {
    if (e == -1) {
      s.insert(ans[total]);
      total++;
    } else {
      if (*(s.begin()) != e) no();
      s.erase(s.begin());
    }
  }
  cout << "YES\n";
  for (auto e : ans) cout << e << " ";
  cout << "\n";
}
void solve() {}
void write() {}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  read();
  solve();
  write();
  return 0;
}
