#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
int n, line[200010], mx[200010], used[200010], sum[200010], r, loc;
bool fail = 0;
char s[100010];
int main() {
  n = read();
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%s", s + 1);
    if (s[1] == '+') {
      line[++r] = ++loc;
    } else {
      int x = read();
      if (!r || used[x]) {
        fail = 1;
        break;
      }
      used[x] = 1;
      if (mx[line[r]] > x) {
        fail = 1;
        break;
      }
      mx[line[r]] = x;
      mx[line[r - 1]] = max(mx[line[r - 1]], mx[line[r]]);
      r--;
    }
  }
  if (fail) {
    printf("NO\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) ++sum[mx[i]];
  for (int i = n; i >= 0; i--) {
    sum[i] += sum[i + 1];
    if (sum[i] > n - i + 1) fail = 1;
  }
  if (fail)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", mx[i]);
    printf("\n");
  }
  return 0;
}
