#include <bits/stdc++.h>
using namespace std;
int a[300005];
void ex() {
  cout << "NO";
  exit(0);
}
int main() {
  int n;
  cin >> n;
  vector<int> khali;
  set<int> st;
  int t = 2 * n;
  int last = 0;
  while (t--) {
    char c;
    cin >> c;
    if (c == '+') {
      khali.push_back(++last);
      continue;
    }
    int x;
    cin >> x;
    if (khali.size() == 0) {
      ex();
    }
    int w = khali.back();
    auto low = st.lower_bound(w);
    if (low != st.end()) {
      int p = a[*low];
      if (x < p) {
        ex();
      } else {
        a[w] = x;
      }
    } else {
      a[w] = x;
    }
    khali.pop_back();
    st.insert(w);
    a[w] = x;
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
}
