#include <bits/stdc++.h>
using namespace std;
const long long SIZE = 2e5 + 50;
const long long inf = 2139062143;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return f * x;
}
long long n, top, now;
long long ans[SIZE];
char str[150];
std::stack<long long> stc;
struct node {
  long long opt, val;
};
node input[SIZE];
signed main() {
  n = read();
  while (!stc.empty()) stc.pop();
  for (long long i = 1; i <= n << 1; ++i) {
    scanf("%s", str);
    if (str[0] == '+')
      input[i].opt = 1;
    else {
      input[i].val = read();
      input[i].opt = 2;
    }
  }
  n <<= 1;
  for (long long i = 1; i <= n; ++i) {
    if (input[i].opt == 1)
      top++;
    else if (!top) {
      printf("NO\n");
      return 0;
    } else
      top--;
  }
  now = n >> 1;
  for (long long i = n; i; --i) {
    if (input[i].opt == 1) {
      ans[now--] = stc.top();
      stc.pop();
    } else if (!stc.empty() && input[i].val > stc.top()) {
      printf("NO\n");
      return 0;
    } else
      stc.push(input[i].val);
  }
  while (!stc.empty()) stc.pop();
  printf("YES\n");
  for (long long i = 1; i <= n >> 1; ++i) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
