#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  void solve() {
    int n;
    cin >> n;
    vector<int> seq(n);
    int idx = 0;
    set<int> pos;
    vector<int> mp(2 * n);
    vector<pair<char, int>> v;
    v.reserve(2 * n);
    for (int i = 0; i < n * 2; ++i) {
      char c;
      cin >> c;
      int x = 0;
      if (c == '-') {
        if (pos.empty()) {
          printf("NO\n");
          return;
        }
        cin >> x;
        int p = *pos.rbegin();
        int id = mp[p];
        pos.erase(p);
        seq[id] = x;
      } else {
        pos.insert(i);
        mp[i] = idx++;
      }
      v.emplace_back(c, x);
    }
    idx = 0;
    set<int> nums;
    for (auto [c, x] : v) {
      if (c == '-') {
        int t = *nums.begin();
        if (t != x) {
          printf("NO");
          return;
        }
        nums.erase(t);
      } else {
        nums.insert(seq[idx++]);
      }
    }
    printf("YES\n");
    for (int i : seq) printf("%d ", i);
  }
};
int main() {
  Solution solution = Solution();
  solution.solve();
}
