#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int ans[maxn];
char str[2];
struct operation {
  char opt[2];
  int val;
} o[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; ++i) {
    scanf("%s", o[i].opt);
    if (o[i].opt[0] == '-') scanf("%d", &o[i].val);
  }
  priority_queue<int, vector<int>, greater<int> > pq;
  int pos = n, flag = 0;
  for (int i = 2 * n; i >= 1 && !flag; i--) {
    if (o[i].opt[0] == '-') {
      pq.push(o[i].val);
    } else {
      if (pq.size() == 0) {
        flag = 1;
        continue;
      }
      ans[pos--] = pq.top();
      pq.pop();
    }
  }
  pos = 0;
  for (int i = 1; i <= 2 * n && !flag; ++i) {
    if (o[i].opt[0] == '-') {
      if (pq.size() == 0 || pq.top() != o[i].val) {
        flag = 1;
        continue;
      }
      pq.pop();
    } else {
      if (pos == n) flag = 1;
      pq.push(ans[++pos]);
    }
  }
  if (flag)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 1; i <= n; ++i) {
      cout << ans[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
