#include <bits/stdc++.h>
using namespace std;
set<long long> sr;
vector<pair<char, long long> > vr;
long long n, tr[200005], ans[200005];
long long sum(long long idx) {
  long long ans = 0;
  while (idx) {
    ans += tr[idx];
    idx -= (idx & -idx);
  }
  return ans;
}
void add(long long idx) {
  while (idx <= n) {
    tr[idx]++;
    idx += (idx & -idx);
  }
}
long long qr[200005];
long long sum1(long long idx) {
  long long ans = 0;
  while (idx) {
    ans += qr[idx];
    idx -= (idx & -idx);
  }
  return ans;
}
void add1(long long idx) {
  while (idx <= n) {
    qr[idx]++;
    idx += (idx & -idx);
  }
}
int main() {
  cin >> n;
  char ch;
  long long tot = 0, ok = 1, ww = 0;
  for (int i = 0; i < 2 * n; i++) {
    cin >> ch;
    if (ch == '+')
      tot++, ww++, vr.push_back(make_pair('+', 0));
    else {
      long long x;
      cin >> x;
      vr.push_back(make_pair('-', x));
      tot--;
      add(x);
      long long rr = sum1(ww), low = 0, high = ww, mid, aa = 0;
      while (low <= high) {
        mid = (low + high) / 2;
        if (rr - sum1(mid) != ww - mid) {
          aa = mid;
          low = mid + 1;
        } else
          high = mid - 1;
      }
      add1(aa + 1);
      ans[aa + 1] = x;
      long long rem = (n - x) - (sum(n) - sum(x));
      if (!(tot <= rem)) ok = 0;
    }
    if (tot < 0) ok = 0;
  }
  if (ok) {
    long long l = 1;
    for (int i = 0; i < vr.size(); i++) {
      if (vr[i].second == 0)
        sr.insert(ans[l++]);
      else {
        if (vr[i].second != *sr.begin()) ok = 0;
        sr.erase(sr.begin());
      }
    }
  }
  if (!ok)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) {
      if (ans[i] == 0) assert(0);
      cout << ans[i] << " ";
    }
  }
}
