#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  stack<int> s;
  vector<pair<long long, long long> > order;
  int ok = 1;
  for (int i = 0; i < 2 * n; i++) {
    string str;
    cin >> str;
    if (str == "+") {
      s.push(i);
      order.push_back({0, 0});
    } else {
      int x;
      cin >> x;
      order.push_back({1, x});
      if (s.empty()) {
        ok = 0;
        break;
      }
      order[s.top()].second = x;
      s.pop();
    }
  }
  if (!ok) {
    cout << "NO\n";
    return 0;
  }
  ok = 1;
  set<int> elems;
  vector<int> ans;
  for (int i = 0; i < 2 * n; i++) {
    if (order[i].first == 0) {
      elems.insert(order[i].second);
      ans.push_back(order[i].second);
    } else {
      int lo = *elems.begin();
      if (lo != order[i].second) {
        ok = 0;
        break;
      }
      elems.erase(lo);
    }
  }
  if (!ok)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (int x : ans) cout << x << " ";
    cout << "\n";
  }
}
