#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int N = 100005;
int a[N * 2], ans[N];
stack<int> s;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    char op;
    scanf(" %c", &op);
    if (op == '+') {
      a[i] = -1;
    } else {
      scanf("%d", &a[i]);
    }
  }
  int t = n;
  for (int i = 2 * n; i >= 1; i--) {
    if (a[i] == -1) {
      if (s.empty()) return puts("NO"), 0;
      ans[t--] = s.top();
      s.pop();
    } else {
      if (!s.empty() && a[i] > s.top()) return puts("NO"), 0;
      s.push(a[i]);
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d%c", ans[i], " \n"[i == n]);
  return 0;
}
