#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a;
  int last = 0;
  bool ok = true;
  for (int i = 0, cnt = 0; i < 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      a.push_back(1);
      last = 0;
      ++cnt;
    } else {
      int d;
      cin >> d;
      ok &= (--cnt >= 0 && last < d);
      last = d;
      a.push_back(-d);
    }
  }
  if (!ok) {
    cout << "NO";
    return 0;
  }
  vector<array<int, 2>> ans(n);
  vector<int> st;
  int id = 0;
  n *= 2;
  for (int i = 0, j = 0, group = 0, cnt = 0; i < n; i = j) {
    int sign = a[i] / abs(a[i]);
    while (j < n && sign == a[j] / abs(a[j])) {
      if (sign == -1) {
        ans[st.back()] = {-a[j], group};
        st.pop_back();
        group += int(--cnt == 0);
      } else {
        st.push_back(id++);
        ++cnt;
      }
      ++j;
    }
  }
  n /= 2;
  for (int i = 0, j = 0; i < n; i = j) {
    int maxVal = ans[i][0];
    while (j < n && ans[i][1] == ans[j][1]) {
      if (ans[j][0] > maxVal) {
        cout << "NO";
        return 0;
      }
      ++j;
    }
  }
  cout << "YES\n";
  for (auto &i : ans) cout << i[0] << ' ';
  return 0;
}
