#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<char, int>> a(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    cin >> a[i].first;
    if (a[i].first == '-') {
      int x;
      cin >> x;
      a[i].second = x;
    } else {
      a[i].second = -1;
    }
  }
  vector<int> ans;
  stack<int> pr;
  for (int i = 2 * n - 1; i >= 0; i--) {
    if (a[i].first == '-') {
      pr.push(a[i].second);
    } else {
      if (pr.size() == 0) {
        cout << "NO";
        return 0;
      }
      ans.push_back(pr.top());
      pr.pop();
    }
  }
  reverse(ans.begin(), ans.end());
  set<int> prob;
  int sch = 0;
  for (int i = 0; i < 2 * n; i++) {
    if (a[i].first == '+') {
      prob.insert(ans[sch]);
      sch++;
    } else {
      if (*prob.begin() != a[i].second) {
        cout << "NO";
        return 0;
      }
      prob.erase(a[i].second);
    }
  }
  cout << "YES\n";
  for (auto i : ans) {
    cout << i << ' ';
  }
  return 0;
}
