#include <bits/stdc++.h>
using namespace std;
long long ans[100005], g[200005], p[200005];
int main() {
  long long n, cnt = 0, i = 0, N;
  cin >> n;
  N = n;
  n *= 2;
  deque<long long> d;
  while (n--) {
    i++;
    char a;
    long long q;
    cin >> a;
    if (a == '-') {
      g[i] = -1;
      cin >> q;
      p[i] = q;
      if (d.size() == 0) {
        cout << "NO\n";
        return 0;
      }
      ans[d[d.size() - 1]] = q;
      d.pop_back();
    } else {
      g[i] = 1;
      cnt++;
      d.push_back(cnt);
    }
  }
  set<long long> s;
  set<long long>::iterator ii;
  long long j = 0;
  for (i = 1; i <= 2 * N; i++) {
    if (g[i] == 1) {
      j++;
      s.insert(ans[j]);
    } else {
      ii = s.begin();
      if ((*ii) != p[i]) {
        cout << "NO\n";
        return 0;
      }
      s.erase((*ii));
    }
  }
  cout << "YES\n";
  for (i = 1; i <= N; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
