#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<int> cur;
  bool broken = false;
  vector<int> out;
  vector<string> commands(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    char c;
    string tmp;
    cin >> c;
    if (c == '-') {
      cin >> tmp;
      commands[i] = c + tmp;
    } else {
      commands[i] = c;
    }
  }
  for (int i = 2 * n - 1; i > -1; i--) {
    int tmp = -1;
    string c = commands[i];
    if (c[0] == '-') {
      string tmptmp;
      for (int j = 1; j < c.size(); j++) {
        tmptmp.push_back(c[j]);
      }
      tmp = stoi(tmptmp);
    }
    if (broken) continue;
    if (c[0] == '+') {
      if (cur.empty()) {
        cout << "NO";
        broken = true;
        continue;
      } else {
        out.push_back(*cur.begin());
        cur.erase(cur.begin());
      }
    } else if (c[0] == '-') {
      if (*cur.begin() < tmp && !cur.empty()) {
        cout << "NO";
        broken = true;
        continue;
      } else {
        cur.insert(tmp);
      }
    }
  }
  if (broken) return 0;
  cout << "YES\n";
  for (int i = n - 1; i > -1; i--) cout << out[i] << ' ';
}
