#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long INFF = 1e18;
const long long MAXN = 510;
const long long MOD = 1e9 + 7;
const double PI = acos(-1.0);
const double INFD = 1E9;
const double EPS = 1e-9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long getTC() {
  if (0) {
    long long t;
    cin >> t;
    return t;
  } else
    return 1;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> tab(2 * n);
  for (auto &it : tab) {
    char op;
    cin >> op;
    if (op == '+')
      it = -1;
    else {
      cin >> it;
    }
  }
  priority_queue<long long, vector<long long>, greater<long long>> pq;
  reverse(tab.begin(), tab.end());
  vector<long long> ans;
  for (auto it : tab) {
    if (it == -1) {
      if (pq.empty()) {
        cout << "NO\n";
        return;
      }
      ans.push_back(pq.top());
      pq.pop();
    } else {
      if (!pq.empty() && pq.top() < it) {
        cout << "NO\n";
        return;
      }
      pq.push(it);
    }
  }
  reverse(ans.begin(), ans.end());
  cout << "YES\n";
  for (auto it : ans) cout << it << " ";
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = getTC();
  while (t--) {
    solve();
  }
  return 0;
}
