#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0;
  cin >> n;
  vector<int> m(n + 1, -1);
  vector<int> st;
  for (int x = 0; x < n * 2; x++) {
    char c;
    cin >> c;
    if (c == '+') {
      st.push_back(i);
      i++;
    } else {
      int t;
      cin >> t;
      if (st.size() == 0) {
        cout << "NO\n";
        return 0;
      }
      int pl = st[st.size() - 1];
      st.pop_back();
      if (t < m[pl + 1]) {
        cout << "NO\n";
        return 0;
      }
      m[pl] = t;
    }
  }
  cout << "YES\n";
  for (int x = 0; x < n; x++) {
    cout << m[x] << " ";
  }
}
