#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("popcnt")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(2 * n);
  vector<int> stck;
  for (int i = 0; i < 2 * n; i++) {
    char sym;
    cin >> sym;
    if (sym == '+') {
      stck.push_back(i);
    } else {
      cin >> a[i];
      if (stck.empty()) {
        cout << "NO"
             << "\n";
        return 0;
      }
      a[stck.back()] = a[i];
      a[i] *= -1;
      stck.pop_back();
    }
  }
  set<int> myset;
  for (int i = 0; i < 2 * n; i++) {
    if (a[i] > 0) {
      myset.insert(a[i]);
    } else {
      if (*myset.begin() == -a[i]) {
        myset.erase(*myset.begin());
      } else {
        cout << "NO"
             << "\n";
        return 0;
      }
    }
  }
  cout << "YES"
       << "\n";
  for (int i = 0; i < 2 * n; i++) {
    if (a[i] > 0) cout << a[i] << " ";
  }
  cout << "\n";
}
