#include <bits/stdc++.h>
using namespace std;
long long int mod = 998244353;
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
long long int min(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
long long int binpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long binpow(long long a, long long b) {
  if (b == 0) return 1;
  long long res = binpow(a, b / 2);
  if (b % 2)
    return res * res * a;
  else
    return res * res;
}
void solve() {
  int n;
  cin >> n;
  vector<int> ans(n + 1);
  vector<int> quer(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+')
      quer[i] = 0;
    else {
      int x;
      cin >> x;
      quer[i] = x;
    }
  }
  int last = 0;
  int spot = 0;
  int num = 0;
  queue<int> left;
  stack<int> pos;
  for (int i = 0; i < 2 * n; i++) {
    if (quer[i] == 0) {
      spot++;
      while (!left.empty()) {
        ans[pos.top()] = left.front();
        left.pop();
        pos.pop();
      }
      pos.push(spot);
    } else {
      num++;
      if (num > spot) {
        cout << "NO";
        return;
      }
      if (quer[i] > last) {
        last = quer[i];
        left.push(quer[i]);
      } else {
        if (quer[i - 1] != 0) {
          cout << "NO";
          return;
        }
        left.push(quer[i]);
        last = quer[i];
      }
    }
  }
  while (!left.empty()) {
    ans[pos.top()] = left.front();
    left.pop();
    pos.pop();
  }
  priority_queue<int, vector<int>, greater<int>> pq;
  int p = 1;
  for (int i = 0; i < 2 * n; i++) {
    if (quer[i] == 0) {
      pq.push(ans[p++]);
    } else {
      int x = pq.top();
      pq.pop();
      if (x != quer[i]) {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  for (int zz = 1; zz <= t; zz++) {
    solve();
  }
}
