#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
long long n;
pair<char, long long> ar[N];
vector<long long> vec;
set<long long> st;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  n *= 2;
  for (long long i = 0; i < n; i++) {
    char c;
    long long x;
    cin >> c;
    if (c == '+')
      ar[i].first = c;
    else {
      cin >> x;
      ar[i] = {c, x};
    }
  }
  bool check = 1;
  for (long long i = 0; i < n; i++) {
    if (ar[i].first == '+')
      vec.push_back(i);
    else {
      if (!vec.size()) {
        check = 0;
        break;
      }
      long long indx = vec.back();
      vec.pop_back();
      ar[indx].second = ar[i].second;
    }
  }
  if (!check) return cout << "NO\n", 0;
  for (long long i = 0; i < n; i++)
    if (ar[i].first == '+')
      st.insert(ar[i].second);
    else {
      if (!st.size()) {
        check = 0;
        break;
      }
      long long x = (*st.begin());
      st.erase(x);
      if (x != ar[i].second) {
        check = 0;
        break;
      }
    }
  if (!check) return cout << "NO\n", 0;
  cout << "YES\n";
  for (long long i = 0; i < n; i++)
    if (ar[i].first == '+') cout << ar[i].second << ' ';
  cout << endl;
}
