#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void no() {
  cout << "NO";
  exit(0);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n * 2);
  for (int i = 0; i < n * 2; i++) {
    char c;
    cin >> c;
    if (c == '+')
      a[i] = -1;
    else {
      int x;
      cin >> x;
      a[i] = x;
    }
  }
  reverse(a.begin(), a.end());
  stack<int> st;
  vector<int> res;
  for (int i = 0; i < n * 2; i++) {
    if (a[i] == -1) {
      if (st.empty()) {
        no();
      } else {
        res.push_back(st.top());
        st.pop();
      }
      continue;
    }
    if (st.empty()) {
      st.push(a[i]);
    } else {
      if (st.top() < a[i]) {
        no();
      }
      st.push(a[i]);
    }
  }
  reverse(res.begin(), res.end());
  cout << "YES\n";
  for (auto i : res) {
    cout << i << " ";
  }
  return 0;
}
