#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long INF = 1ll * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7;
const long long MOD2 = 998244353;
const long long N = 1000 * 100 + 10;
const long long N2 = 70;
const long double PI = 3.141592653589793;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long p = LLONG_MAX) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  bool ok = true;
  long long n;
  cin >> n;
  vector<long long> ans(n);
  stack<pair<long long, long long> > s;
  long long cur = 0;
  long long big = -1;
  long long biginset = -1;
  std::vector<long long> newo;
  for (long long i = 0; i < 2 * n; i++) {
    long long x = -1;
    char c;
    cin >> c;
    if (c == '-') {
      cin >> x;
    } else {
      newo.push_back(cur++);
    }
    if (c == '-' && s.empty() && newo.empty()) {
      ok = false;
      break;
    }
    if (c == '-') {
      if (!newo.empty()) {
        ans[newo[0]] = x;
        for (long long i = 1; i < newo.size(); i++) {
          s.push({x, newo[i]});
        }
        newo.clear();
      } else {
        pair<long long, long long> u = s.top();
        if (x < u.first) {
          ok = false;
          break;
        } else {
          ans[u.second] = x;
          s.pop();
          if (!s.empty()) s.top().first = max(s.top().first, x);
        }
      }
    }
  }
  cout << (ok ? "YES" : "NO") << "\n";
  if (ok)
    for (auto x : ans) cout << x << " ";
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  ;
  return 0;
}
