#include <bits/stdc++.h>
using namespace std;
int n, tot, a[100005], vis[100005];
vector<int> V;
signed main() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    char opt = getchar();
    while (opt != '-' && opt != '+') opt = getchar();
    if (opt == '+')
      tot++, V.push_back(tot);
    else {
      int x;
      cin >> x;
      if (!V.size()) {
        puts("NO");
        return 0;
      }
      if (vis[x]) {
        puts("NO");
        return 0;
      }
      if (a[V.back()] > x) {
        puts("NO");
        return 0;
      }
      vis[x] = 1;
      a[V.back()] = x;
      int tmp = V.back();
      V.pop_back();
      if (V.empty()) {
        continue;
      }
      a[V.back()] = max(a[V.back()], a[tmp]);
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
}
