#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int n, bal, b[500005], c[500005];
string a[500005];
set<int> s;
void solve() {
  cin >> n;
  n += n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == "-") cin >> b[i];
  }
  for (int i = 1; i <= n; i++) {
    bal += pow(-1, (a[i] == "-"));
    if (bal < 0) {
      cout << "NO\n";
      return;
    }
    if (i == n && bal) {
      cout << "NO\n";
      return;
    }
  }
  bal = 0;
  for (int i = n; i >= 1; i--) {
    if (a[i] == "+") {
      bal++;
    } else {
      while (bal) {
        s.erase(s.begin());
        --bal;
      }
      if ((int)s.size()) {
        if (*s.begin() < b[i]) {
          cout << "NO\n";
          return;
        }
      }
      s.insert(b[i]);
    }
  }
  s.clear();
  cout << "YES\n";
  for (int i = n; i >= 1; i--) {
    if (a[i] == "+") {
      c[i] = *s.begin();
      s.erase(s.begin());
    } else {
      s.insert(b[i]);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (c[i]) {
      cout << c[i] << " ";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(30);
  cerr.precision(7);
  ;
  int T = 1;
  while (T--) solve();
  return 0;
}
