#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool chkmin(T1 &x, T2 y) {
  return y < x ? (x = y, true) : false;
}
template <typename T1, typename T2>
bool chkmax(T1 &x, T2 y) {
  return y > x ? (x = y, true) : false;
}
void debug_out() { cerr << endl; }
template <typename T1, typename... T2>
void debug_out(T1 A, T2... B) {
  cerr << ' ' << A;
  debug_out(B...);
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(2 * n, 0);
  vector<int> st;
  for (int i = 0; i < 2 * n; ++i) {
    char cmd;
    cin >> cmd;
    if (cmd == '+') {
      st.push_back(i);
      a[i] = 0;
    } else {
      cin >> a[i];
      if (st.empty()) return 0 * puts("NO");
      a[st.back()] = a[i];
      st.pop_back();
      a[i] *= -1;
    }
  }
  set<int> s;
  for (int i = 0; i < 2 * n; ++i) {
    if (a[i] > 0)
      s.insert(a[i]);
    else {
      if ((*s.begin()) < -a[i]) {
        return 0 * puts("NO");
      }
      s.erase(s.begin());
    }
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n; ++i)
    if (a[i] > 0) cout << a[i] << ' ';
  cout << '\n';
  return 0;
}
