#include <bits/stdc++.h>
using namespace std;
struct point {
  long long value, max, min;
};
void solution() {
  int n;
  cin >> n;
  vector<int> action(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    string a;
    cin >> a;
    if (a == "+") {
      action[i] = 0;
    } else {
      int buff;
      cin >> buff;
      action[i] = buff;
    }
  }
  vector<int> values;
  vector<int> mass;
  for (int i = 2 * n - 1; i >= 0; i--) {
    if (action[i] == 0) {
      if (mass.size() == 0) {
        cout << "NO" << endl;
        return;
      }
      values.push_back(mass[mass.size() - 1]);
      mass.pop_back();
    } else {
      mass.push_back(action[i]);
    }
  }
  vector<int> copy = values;
  set<int> val;
  bool flag = 0;
  for (int i = 0; i < 2 * n; i++) {
    if (action[i] == 0) {
      val.insert(values[values.size() - 1]);
      values.pop_back();
    } else {
      if (action[i] != *val.begin()) {
        flag = 1;
        break;
      } else {
        val.erase(val.begin());
      }
    }
  }
  reverse(copy.begin(), copy.end());
  if (flag) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES\n";
  for (auto i : copy) {
    cout << i << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  n = 1;
  for (int i = 0; i < n; i++) {
    solution();
  }
  return 0;
}
