#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
const long long INF = 1e18;
vector<int> tree;
void update(int v, int l, int r, int p, int x) {
  if (l > p || r < p) return;
  if (l == r) {
    tree[v] = x;
    return;
  }
  int c = (l + r) / 2;
  update(2 * v, l, c, p, x);
  update(2 * v + 1, c + 1, r, p, x);
  tree[v] = max(tree[2 * v], tree[2 * v + 1]);
}
int max(int v, int l, int r, int ql, int qr) {
  if (l > qr || r < ql) return 0;
  if (l >= ql && r <= qr) return tree[v];
  int c = (l + r) / 2;
  return max(max(2 * v, l, c, ql, qr), max(2 * v + 1, c + 1, r, ql, qr));
}
void solve() {
  int n;
  cin >> n;
  vector<int> ans(2 * n);
  vector<int> s;
  int start = 1;
  while (start < 2 * n + 5) start *= 2;
  tree = vector<int>(2 * start);
  for (int i = 0; i < 2 * n; ++i) {
    char t;
    cin >> t;
    if (t == '+') {
      s.push_back(i);
    } else {
      int x;
      cin >> x;
      if (!s.size()) {
        cout << "NO\n";
        return;
      }
      if (max(1, 0, start - 1, s.back(), i) > x) {
        cout << "NO\n";
        return;
      }
      ans[s.back()] = x;
      update(1, 0, start - 1, s.back(), x);
      s.pop_back();
    }
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n; ++i) {
    if (ans[i]) cout << ans[i] << ' ';
  }
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t--) solve();
}
