#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
string no = "NO\n", yes = "YES\n";
string imp = "IMPOSSIBLE\n";
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> st;
  vector<long long> ans(n);
  bool fl = true;
  long long cnt = 0;
  vector<bool> was(2 * n);
  vector<long long> x(2 * n);
  for (long long i = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (fl) {
      if (c == '+') {
        st.push_back(cnt);
        x[i] = cnt;
        cnt++;
      } else {
        was[i] = true;
        cin >> x[i];
        if (st.empty()) {
          fl = false;
        } else {
          ans[st.back()] = x[i];
          st.pop_back();
        }
      }
    }
  }
  if (!st.empty()) fl = false;
  if (fl) {
    for (long long i = 0; i < 2 * n; i++) {
      if (was[i]) {
        long long xx = st.back();
        st.pop_back();
        if (xx != x[i]) {
          fl = false;
          break;
        }
      } else {
        long long xx = ans[x[i]];
        if (st.back() < xx) {
          xx = st.back();
        }
        st.push_back(xx);
      }
    }
  }
  if (fl) {
    cout << yes;
    for (auto el : ans) cout << el << " ";
    cout << endl;
  } else {
    cout << no;
  }
  return 0;
}
