#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
char op[N * 2];
int c[N * 2], a[N];
bool test() {
  priority_queue<int, vector<int>, greater<int>> h;
  int cur_add = 0;
  for (int i = 1; i <= n + n; ++i)
    if (op[i] == '+')
      h.push(a[++cur_add]);
    else {
      if (h.top() != c[i]) return false;
      h.pop();
    }
  return true;
}
int main() {
  stack<int> stk;
  int cur_add = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n + n; ++i) {
    scanf(" %c", op + i);
    if (op[i] == '+')
      stk.push(++cur_add);
    else {
      scanf("%d", c + i);
      if (stk.empty()) return puts("NO"), 0;
      a[stk.top()] = c[i];
      stk.pop();
    }
  }
  if (!test()) return puts("NO"), 0;
  puts("YES");
  for (int i = 1; i <= n; ++i) printf("%d%c", a[i], " \n"[i == n]);
  return 0;
}
