#include <bits/stdc++.h>
using namespace std;
const long long INF = 1ll << 32;
void solve() {
  int n;
  cin >> n;
  stack<pair<long long int, long long int> > s;
  vector<int> ans(n, -1);
  int curr = 0, add = 0;
  bool imp = true;
  for (int i = 0; i < 2 * n; ++i) {
    char ch;
    cin >> ch;
    if (ch == '+') {
      curr++;
      add++;
    } else {
      int x;
      cin >> x;
      if (!imp) continue;
      if (curr) {
        s.push({add - 1, x});
        curr = 0;
      }
      if (s.empty() || x < s.top().second) {
        imp = false;
        continue;
      }
      ans[s.top().first--] = x;
      if (ans[s.top().first] != -1 || s.top().first == -1) {
        s.pop();
      } else {
        s.top().second = x;
      }
    }
  }
  if (!imp) {
    cout << "NO";
    return;
  }
  cout << "YES"
       << "\n";
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int T = 1;
  while (T--) {
    solve();
  }
}
