#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 228;
pair<long long, long long> a[N];
vector<long long> rr;
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  for (long long e, i = 0; i < n + n; i++) {
    char c;
    cin >> c;
    if (c == '+')
      a[i] = {1, 1};
    else {
      cin >> e;
      a[i] = {-1, e};
    }
  }
  set<long long> e;
  for (long long i = n + n - 1; i >= 0; i--) {
    if (a[i].first == 1) {
      if (e.size() == 0) return cout << "NO", 0;
      rr.push_back(*e.begin());
      e.erase(e.begin());
    } else {
      long long mn = LLONG_MAX;
      if (e.size()) mn = *e.begin();
      if (a[i].second > mn) return cout << "NO", 0;
      e.insert(a[i].second);
    }
  }
  reverse(begin(rr), end(rr));
  cout << "YES\n";
  for (auto i : rr) cout << i << ' ';
}
