#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long N = 2e5;
long long po(long long, long long);
void solve() {
  long long n;
  cin >> n;
  vector<pair<char, long long>> v;
  for (long long i = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      v.push_back({c, 0});
    } else {
      long long x;
      cin >> x;
      v.push_back({c, x});
    }
  }
  stack<long long> st;
  set<long long> s;
  vector<long long> ans;
  for (long long i = 2 * n - 1; i >= 0; i--) {
    char c = v[i].first;
    long long x = v[i].second;
    if (c == '+') {
      if (st.empty()) {
        cout << "NO\n";
        return;
      } else {
        if (st.top() == *s.begin()) {
          ans.push_back(st.top());
          st.pop();
          auto it = s.begin();
          s.erase(it);
        } else {
          cout << "NO\n";
          return;
        }
      }
    } else {
      s.insert(x);
      st.push(x);
    }
  }
  cout << "YES\n";
  reverse((ans).begin(), (ans).end());
  for (auto i : ans) {
    cout << i << " ";
  }
  cout << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  for (long long i = 1; i < t + 1; i++) {
    solve();
  }
  return 0;
}
long long po(long long a, long long b) {
  if (b == 0) return 1;
  long long ans = 1;
  if (b % 2 == 0) {
    ans = po(a, b / 2) % M;
    ans = (ans % M * ans % M) % M;
  } else {
    ans = po(a, (b - 1) / 2) % M;
    ans = (ans % M * ans % M * a) % M;
  }
  return ans % M;
}
