#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n;
set<int> s;
int q[N];
int a[N];
int ans[N];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int i;
  int tt = 0;
  for (i = 1; i <= 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      s.insert(i);
    } else {
      if (!s.size()) {
        cout << "NO" << endl;
        return 0;
      }
      cin >> a[i];
      while (tt && a[q[tt]] < a[i]) tt--;
      auto it = s.end();
      it--;
      if (*it < q[tt]) {
        cout << "NO" << endl;
        return 0;
      }
      ans[*it] = a[i];
      s.erase(it);
      q[++tt] = i;
    }
  }
  cout << "YES" << endl;
  for (i = 1; i <= 2 * n; i++) {
    if (ans[i]) {
      cout << ans[i] << " ";
    }
  }
  cout << endl;
  return 0;
}
