#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template <typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using si = set<int>;
using sl = set<ll>;
template <typename T, class F = function<T(T, T)>>
struct DO {
  vector<T> mas;
  vi pos;
  F upd, chg;
  T inf;
  int siz;
  DO(const int &n, const T &neu, const F &u, const F &c)
      : siz(n), upd(u), chg(c), inf(neu) {
    mas.assign(n * 4 + 5, neu);
    pos.resize(n * 4 + 5);
  }
  void modify(int i, int tl, int tr, int id, T value) {
    if (tl + 1 == tr) {
      mas[i] = chg(mas[i], value);
      pos[i] = tl;
      return;
    }
    int mid = (tl + tr) / 2;
    if (id < mid) {
      modify(i * 2, tl, mid, id, value);
    } else {
      modify(i * 2 + 1, mid, tr, id, value);
    }
    mas[i] = upd(mas[i * 2], mas[i * 2 + 1]);
    if (mas[i] == mas[i * 2 + 1]) {
      pos[i] = pos[i * 2 + 1];
    }
  }
  void setValue(int point, T value) { modify(1, 0, siz, point, value); }
  T getValue(int i, int tl, int tr, int l, int r) {
    if (l <= tl && tr <= r) {
      return mas[i];
    }
    if (tl >= r || l >= tr) {
      return inf;
    }
    int mid = (tl + tr) / 2;
    return upd(getValue(i * 2, tl, mid, l, r),
               getValue(i * 2 + 1, mid, tr, l, r));
  }
  T get(int l, int r) { return getValue(1, 0, siz, l, r + 1); }
  pair<T, int> getValueWithIndex(int i, int tl, int tr, int l, int r) {
    if (l <= tl && tr <= r) {
      return {mas[i], pos[i]};
    }
    if (tl >= r || l >= tr) return {inf, inf};
    int mid = (tl + tr) / 2;
    auto le = getValueWithIndex(i * 2, tl, mid, l, r);
    auto re = getValueWithIndex(i * 2 + 1, mid, tr, l, r);
    if (upd(le.first, re.first) == le.first) return le;
    return re;
  }
  pair<T, int> getValueWithIndex(int l, int r) {
    return getValueWithIndex(1, 0, siz, l, r + 1);
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  int n;
  cin >> n;
  vector<pii> st;
  for (int i = 0; i < 2 * n; ++i) {
    char t;
    int p;
    cin >> t;
    if (t == '+') {
      st.push_back({t, 0});
    } else {
      cin >> p;
      st.push_back({t, p});
    }
  }
  vi ans(2 * n);
  si poses;
  DO<int> phi(
      n + 5, -1e9, [](int a, int b) { return max(a, b); },
      [](int a, int b) { return b; });
  for (int i = 1; i <= n; ++i) phi.setValue(i, -1e9);
  for (int i = 0; i < 2 * n; ++i) {
    if (st[i].first == '+') {
      poses.insert(i);
    } else {
      int k = phi.get(st[i].second + 1, n);
      auto need = poses.lower_bound(k);
      if (need == poses.end()) {
        cout << "NO\n";
        return 0;
      }
      ans[*need] = st[i].second;
      poses.erase(need);
      phi.setValue(st[i].second, i);
    }
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n; ++i) {
    if (ans[i] != 0) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
