#include <bits/stdc++.h>
using namespace std;
const int DIM = 2e5 + 7;
int v[DIM];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= 2 * n; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      v[i] = 0;
    } else {
      int p;
      cin >> p;
      v[i] = -p;
    }
  }
  multiset<int> s;
  for (int i = 2 * n; i >= 1; --i) {
    if (v[i] < 0) {
      if (s.size() == 0 || *s.begin() >= -v[i]) {
        s.insert(-v[i]);
      } else {
        cout << "NO\n";
        return 0;
      }
    } else {
      if (s.size() == 0) {
        cout << "NO\n";
        return 0;
      }
      v[i] = *s.begin();
      s.erase(s.lower_bound(v[i]));
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= 2 * n; ++i) {
    if (v[i] > 0) cout << v[i] << ' ';
  }
}
