#include <bits/stdc++.h>
using namespace std;
void solve();
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(2 * n);
  stack<long long> s;
  long long cn = 0;
  vector<long long> ans(n);
  for (long long i = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      a[i] = 0;
      s.push(cn++);
    } else {
      long long x;
      cin >> x;
      a[i] = x;
      if (s.empty()) {
        cout << "NO";
        return;
      }
      ans[s.top()] = x;
      s.pop();
    }
  }
  set<long long> st;
  long long j = 0;
  for (long long i = 0; i < 2 * n; i++) {
    if (a[i] == 0)
      st.insert(ans[j++]);
    else {
      if (*(st.begin()) != a[i]) {
        cout << "NO";
        return;
      }
      st.erase(st.begin());
    }
  }
  cout << "YES" << endl;
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
  return;
}
