#include <bits/stdc++.h>
using namespace std;
const long long losn = 1e6 + 5;
const long long maxn = 1e5 + 5;
const long long minn = 1e3 + 5;
const long long tiny = 1e2 + 5;
const long long inf = 1e9;
const long long binf = 1e18;
const long long mod = 1e9 + 7;
const long long hmod = 4698571;
const long double pi = 3.1415926;
const long long myn = 0;
void gk() { cout << "---------------" << endl; }
void ck() { cout << 1 << endl; }
void ck(long long a) { cout << a << endl; }
void ck(long long a[minn][minn], long long n, long long m) {
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
}
long long n, m, k, T, u, v, len;
stack<long long> st;
priority_queue<long long, vector<long long>, greater<long long>> q;
long long ans[maxn * 2];
long long numb[maxn * 2];
char c[maxn * 2];
long long id = 0;
int main() {
  bool is = false;
  cin >> n;
  for (long long i = 1; i <= 2 * n; i++) {
    cin >> c[i];
    if (c[i] == '-') {
      long long nums;
      cin >> numb[i];
      nums = numb[i];
      if (st.size()) {
        ans[st.top()] = nums;
        st.pop();
      } else {
        is = true;
      }
    } else {
      st.push(++id);
    }
  }
  long long ids = 0;
  for (long long i = 1; i <= 2 * n; i++) {
    if (c[i] == '+') {
      q.push(ans[++ids]);
    } else {
      if (q.size() && q.top() == numb[i]) {
        q.pop();
      } else {
        is = true;
        break;
      }
    }
  }
  if (is) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (long long i = 1; i <= id; i++) {
      cout << ans[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
