#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops,fast-math,no-stack-protector")
using namespace std;
const long long inf = (long long)1e18 + 228;
const long long cst = (long long)2e5 + 5;
const long long mod = (long long)1e9 + 7;
void operator delete(void*);
void ex(long long exitCode = 0) { exit(exitCode); }
long long n;
long long ans[cst];
set<long long> pos;
vector<long long> q;
long long kek = 1;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  for (long long i = 0; i < 2 * n; i++) {
    char x;
    cin >> x;
    if (x == '+') {
      pos.insert(kek);
      kek++;
      q.push_back(-1);
    } else {
      long long y;
      cin >> y;
      if (pos.empty()) {
        cout << "NO";
        ex();
      }
      long long lol = *pos.rbegin();
      pos.erase(lol);
      ans[lol] = y;
      q.push_back(y);
    }
  }
  long long it = 0;
  set<long long> st;
  for (long long i = 0; i < 2 * n; i++) {
    if (q[i] == -1) {
      it++;
      st.insert(ans[it]);
    } else {
      long long x = *st.begin();
      if (x != q[i]) {
        cout << "NO";
        ex();
      }
      st.erase(x);
    }
  }
  cout << "YES\n";
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
