#include <bits/stdc++.h>
using namespace std;
long long rr[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long cc[] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long inf = 1e18;
const long long mod = 1e9 + 7;
const long long N = 300050;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long test = 1;
  while (test--) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    long long idx = 0;
    set<long long> st, val;
    vector<pair<char, long long> > queries;
    for (long long i = 0; i < 2 * n; i++) {
      char ch;
      long long x = 0;
      cin >> ch;
      if (ch == '+') {
        st.insert(idx++);
      } else {
        if ((long long)st.size() == 0) {
          cout << "NO\n";
          return 0;
        }
        auto it = *(--st.end());
        st.erase(it);
        cin >> x;
        a[it] = x;
      }
      queries.push_back({ch, x});
    }
    idx = 0;
    for (long long i = 0; i < 2 * n; i++) {
      long long ch, x;
      tie(ch, x) = queries[i];
      if (ch == '+') {
        val.insert(a[idx]);
        idx++;
      } else {
        if (x != *(val.begin())) {
          return cout << "NO\n", 0;
        }
        if ((long long)val.size() > 0) val.erase(val.begin());
      }
    }
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      cout << a[i] << ' ';
    }
  }
  return 0;
}
