#include <bits/stdc++.h>
using namespace std;
inline int rd() {
  int x = 0;
  bool f = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + (c ^ 48);
    c = getchar();
  }
  return f ? -x : x;
}
int n, top, ans[200007];
stack<int> zheshigezhan;
struct op {
  int zheshigeflag, zheshigezhi;
} a[200007];
int main() {
  n = rd();
  char cccccs[100];
  while (!zheshigezhan.empty()) zheshigezhan.pop();
  for (int i = 1; i <= n << 1; ++i) {
    cin >> cccccs;
    if (cccccs[0] == '+')
      a[i].zheshigeflag = 1;
    else {
      a[i].zheshigezhi = rd();
      a[i].zheshigeflag = 2;
    }
  }
  n <<= 1;
  for (int i = 1; i <= n; i++) {
    if (a[i].zheshigeflag == 1)
      ++top;
    else if (!top) {
      puts("NO");
      return 0;
    } else
      --top;
  }
  int now = n >> 1;
  for (int i = n; i; i--) {
    if (a[i].zheshigeflag == 1) {
      ans[now--] = zheshigezhan.top();
      zheshigezhan.pop();
    } else if (!zheshigezhan.empty() && a[i].zheshigezhi > zheshigezhan.top()) {
      puts("NO");
      return 0;
    } else
      zheshigezhan.push(a[i].zheshigezhi);
  }
  while (!zheshigezhan.empty()) zheshigezhan.pop();
  puts("YES");
  for (int i = 1; i <= n >> 1; ++i) printf("%d ", ans[i]);
  return 0;
}
