#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
using ld = long double;
using uint = uint32_t;
const double EPS = 1e-8;
const int INF = 0x3F3F3F3F;
const ll LINF = 4611686018427387903;
const int MOD = 1e9 + 7;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  int t = 0;
  vector<int> ans(n), st;
  vector<pair<int, int>> conts;
  for (int i = 0; i < 2 * n; i++) {
    string s;
    int x;
    cin >> s;
    if (s == "+") {
      st.push_back(t);
      conts.push_back({t++, 0});
    } else {
      cin >> x;
      if (st.empty()) return cout << "NO\n", 0;
      if (conts.back().second > x) return cout << "NO\n", 0;
      ans[st.back()] = x;
      st.pop_back();
      while (conts.size() && conts.back().second < x + 1) conts.pop_back();
      if (st.size() && (conts.empty() || conts.back().first < st.back()))
        conts.push_back({st.back(), x + 1});
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << ans[i] << " \n"[i == n - 1];
  return 0;
}
