#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  stack<int> s;
  vector<int> sur(n);
  vector<int> is;
  is.reserve(n);
  vector<int> ks;
  ks.reserve(n);
  int ind = 0;
  for (int i = 0; i < 2 * n; i++) {
    char ch;
    cin >> ch;
    if (ch == '+') {
      s.push(ind);
      ind++;
    } else {
      int k;
      cin >> k;
      int indd;
      if (!s.empty())
        indd = s.top();
      else {
        cout << "NO";
        return 0;
      }
      s.pop();
      sur[indd] = k;
      is.push_back(i);
      ks.push_back(k);
    }
  }
  ind = 0;
  priority_queue<int> q;
  int cur = 0;
  string out;
  for (int i = 0; i < 2 * n; i++) {
    if (i == is[cur]) {
      int k = q.top();
      q.pop();
      if (k != -ks[cur]) {
        cout << "NO";
        return 0;
      }
      cur++;
    } else {
      q.push(-sur[ind]);
      stringstream ss;
      string to;
      ss << sur[ind];
      ss >> to;
      out += to + " ";
      ind++;
    }
  }
  cout << "YES" << endl << out;
  return 0;
}
