#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <typename T>
using v = vector<T>;
template <typename... T>
using tup = tuple<T...>;
template <typename T1, typename T2>
using pa = pair<T1, T2>;
const ld PI = 3.1415926535;
const ll MOD = 1e9 + 7;
ll gcd(ll a, ll b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
void solve() {
  ll n;
  cin >> n;
  n *= 2;
  v<ll> actions(n);
  for (ll i = 0; i < n; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      actions[i] = -1;
    } else {
      cin >> actions[i];
    }
  }
  set<ll> surikens;
  bool possible = true;
  v<ll> reverseAdditions;
  for (ll i = n - 1; i >= 0; --i) {
    if (actions[i] < 0) {
      if (surikens.size() > 0) {
        reverseAdditions.push_back(*surikens.begin());
        surikens.erase(surikens.begin());
      } else {
        possible = false;
        break;
      }
    } else {
      if (surikens.size() > 0) {
        if (*surikens.begin() < actions[i]) {
          possible = false;
          break;
        }
      }
      { surikens.insert(actions[i]); }
    }
  }
  if (possible) {
    set<ll> surikens;
    ll ra = reverseAdditions.size() - 1;
    for (ll action : actions) {
      if (action < 0) {
        surikens.insert(reverseAdditions[ra--]);
      } else if (*surikens.begin() != action) {
        possible = false;
        break;
      } else {
        surikens.erase(action);
      }
    }
  }
  if (possible) {
    cout << "YES\n";
    for (ll i = reverseAdditions.size() - 1; i >= 0; --i) {
      cout << reverseAdditions[i] << ' ';
    }
  } else {
    cout << "NO";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ll t = 1;
  for (ll i = 0; i < t; ++i) {
    solve();
  }
}
