#include <bits/stdc++.h>
using namespace std;
void __start__() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
mt19937_64 rnd(time(0));
using ll = long long;
using vi = vector<int>;
using ld = long double;
using vb = vector<bool>;
using pii = pair<int, int>;
using vd = vector<long double>;
using vvi = vector<vector<int>>;
using vpii = vector<pair<int, int>>;
void test_case() {
  int n;
  cin >> n;
  vector<pair<bool, int>> a(2 * n);
  vi ans;
  for (int i = 0, q; i < 2 * n; ++i) {
    char c;
    cin >> c;
    if (c == '-') {
      cin >> q;
      a[i] = {1, q};
    } else {
      a[i].first = 0;
    }
  }
  reverse(a.begin(), a.end());
  multiset<int> s;
  int last = -1;
  for (int i = 0; i < 2 * n; ++i) {
    if (a[i].first) {
      s.insert(a[i].second);
      if (*s.begin() != a[i].second) {
        cout << "NO";
        exit(0);
      }
    } else {
      if ((int)s.size()) {
        ans.push_back(*s.begin());
        s.erase(s.begin());
      } else {
        cout << "NO";
        exit(0);
      }
      last = -1;
    }
  }
  cout << "YES\n";
  reverse(ans.begin(), ans.end());
  for (auto qwqw : ans) cout << qwqw << ' ';
  ;
}
signed main() {
  __start__();
  int t = 1;
  while (t--) test_case();
}
