#include <bits/stdc++.h>
using namespace std;
const int MAXN = 202020;
int val[MAXN], n;
char op[MAXN][3];
int main() {
  scanf("%d", &n);
  n *= 2;
  stack<int> adds;
  vector<int> ans;
  for (int i = 1; i <= n; ++i) {
    scanf("%s", op[i]);
    if (op[i][0] == '+')
      adds.push(i);
    else if (op[i][0] == '-') {
      scanf("%d", &val[i]);
      if (adds.empty()) {
        puts("NO");
        return 0;
      }
      int v = adds.top();
      adds.pop();
      val[v] = val[i];
    }
  }
  priority_queue<int, vector<int>, greater<int> > pq;
  for (int i = 1; i <= n; ++i) {
    if (op[i][0] == '-') {
      if (pq.top() != val[i]) {
        puts("NO");
        return 0;
      }
      pq.pop();
    } else {
      pq.push(val[i]);
      ans.push_back(val[i]);
    }
  }
  puts("YES");
  for (auto g : ans) printf("%d ", g);
  return 0;
}
