#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n;
  cin >> n;
  vector<pair<char, int>> op(n * 2);
  for (int i = 0; i < n * 2; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      op[i].first = '+';
    } else {
      int k;
      cin >> k;
      op[i].first = '-';
      op[i].second = k;
    }
  }
  set<int> a;
  vector<int> ans(n);
  reverse(op.begin(), op.end());
  int ind = n - 1;
  for (int i = 0; i < n * 2; ++i) {
    if (op[i].first == '-') {
      a.insert(op[i].second);
      if (*a.begin() != op[i].second) {
        cout << "NO";
        return 0;
      }
    } else {
      if (a.size() > 0) {
        ans[ind] = *a.begin();
        a.erase(a.begin());
        ind -= 1;
      } else {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
}
