#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    vector<pair<long long, long long> > event(2 * n);
    for (long long i = 0; i < 2 * n; ++i) {
      char x;
      cin >> x;
      if (x == '+') {
        event[i] = {0, 0};
      } else {
        long long tmp;
        cin >> tmp;
        event[i] = {1, tmp};
      }
    }
    set<long long> s;
    vector<long long> result;
    for (long long i = 2 * n - 1; i >= 0; --i) {
      if (event[i].first == 0) {
        if (s.empty()) {
          cout << "NO"
               << "\n";
          return 0;
        } else {
          result.push_back(*s.begin());
          s.erase(s.begin());
        }
      } else {
        if (s.empty()) {
          s.insert(event[i].second);
        } else if (event[i].second > *s.begin()) {
          cout << "NO"
               << "\n";
          return 0;
        } else {
          s.insert(event[i].second);
        }
      }
    }
    cout << "YES"
         << "\n";
    for (long long i = n - 1; i >= 0; --i) {
      cout << result[i] << ' ';
    }
  }
}
