#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template <typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using si = set<int>;
using sl = set<ll>;
const int N = 2e5 + 40;
int a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  int n;
  cin >> n;
  for (int i = 0; i < 2 * n; ++i) {
    char t;
    cin >> t;
    if (t == '+') {
      a[i] = -1;
    } else {
      int num;
      cin >> num;
      a[i] = num;
    }
  }
  for (int i = 0; i < 2 * n;) {
    if (a[i] == -1) {
      i++;
      continue;
    }
    int j = i;
    while (j < 2 * n && a[j] != -1) j++;
    for (int l = i + 1; l < j; ++l) {
      if (a[l - 1] > a[l]) {
        cout << "NO\n";
        return 0;
      }
    }
    i = j;
  }
  set<int> cur;
  vi ans;
  for (int i = 2 * n - 1; i >= 0; --i) {
    if (a[i] > 0)
      cur.insert(a[i]);
    else {
      if ((int)cur.size() == 0) {
        cout << "NO\n";
        return 0;
      }
      ans.push_back(*cur.begin());
      cur.erase(cur.begin());
    }
  }
  reverse((ans).begin(), (ans).end());
  set<int> me;
  int ptr = 0;
  for (int i = 0; i < 2 * n; ++i) {
    if (a[i] < 0)
      me.insert(ans[ptr++]);
    else {
      if ((int)me.size() == 0 || (*me.begin()) != a[i]) {
        cout << "NO\n";
        return 0;
      }
      me.erase(me.begin());
    }
  }
  cout << "YES\n";
  for (int i : ans) cout << i << " ";
  return 0;
}
