#include <bits/stdc++.h>
using namespace std;
long long int solve() {
  long long int n, cnt = 0;
  cin >> n;
  long long int ans[n + 1], lo_size = 0, lo_bound = 0;
  deque<long long int> dq;
  char ch;
  long long int x;
  vector<pair<char, long long int>> qu;
  for (long long int i = 0; i < 2 * n; ++i) {
    cin >> ch;
    long long int x = 0;
    if (ch == '-') {
      cin >> x;
      if (dq.empty())
        return cout << "NO"
                    << "\n",
               0;
      else if (x > lo_bound) {
        ans[dq.back()] = x;
        dq.pop_back();
        lo_bound = x;
        lo_size = dq.size();
      } else {
        ans[dq.front()] = x;
        dq.pop_front();
      }
    } else {
      cnt++;
      dq.push_front(cnt);
    }
    qu.push_back({ch, x});
  }
  set<long long int> st;
  cnt = 0;
  for (long long int i = 0; i < 2 * n; ++i) {
    if (qu[i].first == '+')
      st.insert(ans[++cnt]);
    else {
      long long int y = *st.begin();
      if (qu[i].second != y)
        return cout << "NO"
                    << "\n",
               0;
      st.erase(st.begin());
    }
  }
  cout << "YES"
       << "\n";
  for (long long int i = 1; i <= n; ++i) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
