#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<string> ops(2 * n);
  getline(cin, ops[0]);
  for (int i = 0; i < 2 * n; ++i) {
    getline(cin, ops[2 * n - i - 1]);
  }
  priority_queue<int, vector<int>, greater<int>> heap;
  vector<int> sol;
  bool ok = true;
  for (const string& op : ops) {
    if (op[0] == '-') {
      heap.push(stoi(op.substr(2, op.size() - 2)));
    } else {
      if (heap.empty()) {
        ok = false;
        break;
      } else {
        sol.push_back(heap.top());
        heap.pop();
      }
    }
  }
  if (!ok) {
    cout << "NO\n";
    return 0;
  }
  reverse(sol.begin(), sol.end());
  reverse(ops.begin(), ops.end());
  int next_sol_pos = 0;
  for (const string& op : ops) {
    if (op == "+") {
      heap.push(sol[next_sol_pos++]);
    } else {
      int taken = stoi(op.substr(2, op.size() - 2));
      if (taken != heap.top()) {
        ok = false;
        break;
      }
      heap.pop();
    }
  }
  if (ok) {
    cout << "YES\n";
    for (const int val : sol) {
      cout << val << " ";
    }
    cout << "\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
