#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int> > q;
vector<int> ans;
int n, a[200005];
char opt[200005];
int main() {
  ios::sync_with_stdio(false);
  int i;
  cin >> n;
  for (i = 1; i <= 2 * n; i++) {
    cin >> opt[i];
    if (opt[i] == '-') cin >> a[i];
  }
  for (i = 2 * n; i; i--) {
    if (opt[i] == '-')
      q.push(a[i]);
    else {
      if (q.empty()) {
        cout << "NO";
        return 0;
      }
      a[i] = q.top();
      q.pop();
    }
  }
  if (!q.empty()) {
    cout << "NO";
    return 0;
  }
  for (i = 1; i <= 2 * n; i++) {
    if (opt[i] == '+')
      q.push(a[i]), ans.push_back(a[i]);
    else {
      if (a[i] != q.top()) {
        cout << "NO";
        return 0;
      }
      q.pop();
    }
  }
  cout << "YES\n";
  for (auto i : ans) cout << i << ' ';
  return 0;
}
