#include <bits/stdc++.h>
using namespace std;
void sep() { cout << "-------------BLOCK-----------------\n"; }
template <typename T>
void debugv(vector<T> arr) {
  for (auto t : arr) cout << t << " ";
  cout << "\n";
}
template <typename T>
void debugarr(T arr, int n) {
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "\n";
}
template <typename T>
void chmax(T& a, T b) {
  if (a < b) a = b;
}
long long __min(long long a, long long b) { return a < b ? a : b; }
long long __max(long long a, long long b) { return a > b ? a : b; }
const int maxn = 4e6 + 100;
long long arr[maxn], n, m, t, k, q;
unordered_map<long long, long long> u;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  vector<pair<string, string>> queries;
  q = 2 * n;
  string a, b;
  while (q--) {
    cin >> a;
    if (a == "-") cin >> b;
    queries.push_back({a, b});
  }
  stack<long long> stk;
  vector<long long> order;
  bool pos = true;
  for (int i = (2 * n) - 1; i >= 0 && pos; i--) {
    if (queries[i].first == "+") {
      if (stk.empty()) {
        pos = false;
        break;
      }
      order.push_back(stk.top());
      stk.pop();
    } else {
      long long num = stoll(queries[i].second);
      if (!stk.empty() && stk.top() < num) {
        pos = false;
        break;
      }
      stk.push(num);
    }
  }
  reverse(order.begin(), order.end());
  if (!pos) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (long long i : order) cout << i << " ";
    cout << endl;
  }
}
