#include <bits/stdc++.h>
using namespace std;
bool validate(vector<int> &pl, vector<pair<int, int>> &h) {
  int p = 0;
  set<int> s;
  for (auto &[t, x] : h)
    if (t == 1)
      s.insert(pl[p++]);
    else if (s.empty() || x != *s.begin())
      return false;
    else
      s.erase(s.begin());
  return true;
}
vector<int> solve(vector<pair<int, int>> &h) {
  vector<int> res(h.size() / 2);
  vector<int> stack;
  int cnt1 = 0;
  for (auto &[t, x] : h)
    if (t == 1)
      stack.push_back(cnt1++);
    else if (stack.empty())
      return {};
    else {
      res[stack.back()] = x;
      stack.pop_back();
    }
  if (!validate(res, h)) return {};
  return res;
}
vector<pair<int, int>> generate(int n) {
  for (;;) {
    vector<pair<int, int>> res;
    for (int i = 1; i <= n; ++i) res.emplace_back(1, i);
    for (int i = 0; i < n; ++i) res.emplace_back(-1, 0);
    random_shuffle(res.begin(), res.end());
    bool ok = true;
    set<int> s;
    for (auto &[t, x] : res)
      if (t == 1)
        s.insert(x);
      else if (s.empty()) {
        ok = false;
        break;
      } else {
        x = *s.begin();
        s.erase(s.begin());
      }
    if (ok) return res;
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<pair<int, int>> h(2 * n);
  string s;
  for (int i = 0; i < 2 * n; ++i) {
    cin >> s;
    if (s[0] == '-') {
      h[i].first = -1;
      cin >> h[i].second;
    } else
      h[i].first = 1;
  }
  vector<int> res = solve(h);
  if (res.size() != h.size() / 2)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (int x : res) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
