#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long MOD = 1e9 + 7;
inline long long add(long long &x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline long long mul(long long x, long long y) { return (x * 1ll * y) % mod; }
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
const long long N = 2e5 + 5;
signed main() {
  long long n;
  cin >> n;
  vector<pair<char, long long>> v;
  for (long long i = 0; i < 2 * n; i++) {
    char c;
    long long x;
    cin >> c;
    if (c == '+')
      v.push_back({c, 0});
    else {
      cin >> x;
      v.push_back({c, x});
    }
  }
  reverse(v.begin(), v.end());
  stack<long long> st;
  vector<long long> ans;
  for (long long i = 0; i < 2 * n; i++) {
    char c;
    long long x;
    c = v[i].first;
    if (c == '+') {
      if (st.empty()) return cout << "NO", 0;
      ans.push_back(st.top());
      st.pop();
    } else {
      x = v[i].second;
      if (!st.empty() && st.top() < x) return cout << "NO", 0;
      st.push(x);
    }
  }
  cout << "YES" << endl;
  reverse(ans.begin(), ans.end());
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
}
