#include <bits/stdc++.h>
using namespace std;
ifstream fin("test1.txt");
struct shop {
  vector<pair<int, bool> > s;
  vector<bool> v;
  vector<int> last;
  int cur, n;
  void sets(int a) {
    s.assign(a, {0, 0});
    v.assign(a + 1, 0);
    cur = a;
    n = a;
  }
  bool add(int value, int pos) {
    if (last.empty()) return 0;
    int p = last.back();
    last.pop_back();
    if (s[p].first > 0) {
      v[s[p].first] = 0;
      cur = s[p].first;
    }
    s[p].first = value;
    s[p].second = 1;
    v[value] = 1;
    return 1;
  }
  void fil(int pos) {
    while (v[cur] == 1) cur--;
    s[pos].first = cur;
    v[cur] = 1;
    cur--;
    last.push_back(pos);
  }
  void pr() {
    for (int i = 0; i < (n); i++) cout << s[i].first << " ";
  }
  bool check2(vector<int> &v) {
    int pos = 0;
    set<int> mem;
    for (int i = 0; i < (n * 2); i++) {
      if (v[i] == 1) {
        mem.insert(s[pos].first);
        pos++;
        continue;
      }
      if (v[i] * (-1) > *mem.begin()) return 0;
      mem.erase(mem.begin());
    }
    return 1;
  }
};
bool check(vector<int> &v) {
  int n = v.size();
  int kol = 0;
  for (int i = 0; i < (n); i++) {
    if (v[i] == 1) {
      kol++;
      continue;
    }
    kol--;
    if (kol < 0) return 0;
    if (v[i - 1] < 0 && v[i - 1] * (-1) > v[i] * (-1)) return 0;
  }
  return 1;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < (n * 2); i++) {
    char c;
    cin >> c;
    if (c == '+') {
      v.push_back(1);
    } else {
      int a;
      cin >> a;
      v.push_back(-1 * a);
    }
  }
  bool ok = check(v);
  if (ok == 0) {
    cout << "NO";
    return;
  }
  vector<int> ans(n);
  shop metro;
  metro.sets(n);
  int pos = -1;
  ok = 1;
  for (int i = 0; i < (n * 2); i++) {
    if (v[i] == 1) {
      metro.fil(pos + 1);
      pos++;
      continue;
    }
    if (metro.add(v[i] * (-1), pos) == 0) ok = 0;
  }
  if (ok == 1) ok = metro.check2(v);
  cout << (ok ? "YES" : "NO") << endl;
  if (ok == 1) metro.pr();
}
int main() {
  ios::sync_with_stdio(0);
  ;
  solve();
}
