#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<int, int>;
using PL = pair<lint, lint>;
constexpr int MOD = 1000000007;
constexpr lint B1 = 1532834020;
constexpr lint M1 = 2147482409;
constexpr lint B2 = 1388622299;
constexpr lint M2 = 2147478017;
constexpr int INF = 2147483647;
void yes(bool expr) { cout << (expr ? "Yes" : "No") << "\n"; }
template <class T>
void chmax(T &a, const T &b) {
  if (a < b) a = b;
}
template <class T>
void chmin(T &a, const T &b) {
  if (b < a) a = b;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> seq(2 * n);
  for (int i = (0), i_end_ = (2 * n); i < i_end_; i++) {
    char c;
    cin >> c;
    if (c == '-') {
      int x;
      cin >> x;
      x--;
      seq[i] = x;
    } else {
      seq[i] = -1;
    }
  }
  set<int> st;
  vector<int> ans;
  for (int i = (2 * n) - 1, i_begin_ = (0); i >= i_begin_; i--) {
    if (seq[i] == -1) {
      if (st.size() == 0) {
        cout << "NO" << endl;
        return 0;
      }
      ans.push_back(*st.begin());
      st.erase(st.begin());
    } else {
      if (st.size() > 0) {
        auto itr = st.lower_bound(seq[i]);
        if (itr != st.begin()) {
          cout << "NO" << endl;
          return 0;
        }
      }
      st.insert(seq[i]);
    }
  }
  cout << "YES" << endl;
  for (int i = (n)-1, i_begin_ = (0); i >= i_begin_; i--)
    cout << ans[i] + 1 << " ";
  cout << endl;
}
