#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<char> c(2 * n);
  vector<long long> p(2 * n, 0), ans(n, 0);
  stack<long long> s;
  long long idx = 0;
  for (long long i = 0; i < (long long)(2 * n); i++) {
    cin >> c[i];
    if (c[i] == '-') {
      cin >> p[i];
    }
  }
  for (long long i = 0; i < (long long)(2 * n); i++) {
    if (c[i] == '+') {
      s.push(idx);
      idx++;
    } else {
      if (s.empty()) {
        cout << "NO\n";
        return 0;
      }
      long long t = s.top();
      s.pop();
      ans[t] = p[i];
    }
  }
  priority_queue<long long> q;
  idx = 0;
  for (long long i = 0; i < (long long)(2 * n); i++) {
    if (c[i] == '+') {
      q.push(-ans[idx]);
      idx++;
    } else {
      long long r = -q.top();
      q.pop();
      if (p[i] != r) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (long long i = 0; i < (long long)(n); i++) {
    cout << ans[i];
    if (i == n - 1)
      cout << "\n";
    else
      cout << " ";
  }
}
