#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int n;
  auto val = 0;
  int x;
  char type;
  cin >> n;
  auto first = new int[n];
  auto second = new int[n];
  int fc = -1;
  auto ans = new int[n];
  auto z = n << 1;
  while (z--) {
    cin >> type;
    if (type == '+') {
      first[++fc] = val++;
      second[fc] = 0;
    } else {
      cin >> x;
      if (fc == -1 || x <= second[fc]) {
        cout << "NO";
        return 0;
      }
      ans[first[fc--]] = x;
      if (fc >= 0) {
        auto& s = second[fc];
        if (x > s) s = x;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  return 0;
}
