#include <bits/stdc++.h>
using namespace std;
long long n;
vector<vector<int> > ad(100005);
bool comp(int i, int j) { return (i > j); }
bool comp1(pair<int, pair<int, int> > i, pair<int, pair<int, int> > j) {
  if (i.first == j.first)
    return (i.second.first < j.second.first);
  else
    return (i.first > j.first);
}
long long err(long long x, long long y, long long z) {
  return (((x - y) / 2) * ((x - y) / 2) + ((x - z) / 2) * ((x - z) / 2) +
          ((y - z) / 2) * ((y - z) / 2));
}
pair<int, int> bfs(int s) {
  queue<int> q;
  q.push(s);
  int ma = 0, nma = s;
  vector<bool> used(n + 1);
  vector<int> d(n + 1), p(n + 1);
  used[s] = true;
  p[s] = -1;
  d[s] = 0;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < ad[v].size(); ++i) {
      int to = ad[v][i];
      if (!used[to]) {
        used[to] = true;
        q.push(to);
        d[to] = d[v] + 1;
        if (d[to] > ma) {
          ma = d[to];
          nma = to;
        }
        p[to] = v;
      }
    }
  }
  return make_pair(nma, ma);
}
int bfs1(int s, int s1) {
  queue<int> q;
  q.push(s);
  int ma = 0, nma = s;
  vector<bool> used(n + 1);
  vector<int> d(n + 1), p(n + 1);
  used[s] = true;
  p[s] = -1;
  d[s] = 0;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < ad[v].size(); ++i) {
      int to = ad[v][i];
      if (!used[to]) {
        used[to] = true;
        q.push(to);
        d[to] = d[v] + 1;
        if (to == s1) {
          return d[to];
        }
        p[to] = v;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  double pi;
  long long a[100005], da, db, m1, m2, f, g, e1, e2, bb, cc, tt, dd, i, j, maxx,
      a0, rrr, minn, ans_l, ans_r, min_sum, min_pos, sum, sum1, sum2, sum3,
      sum4, sum5, k1, k2, kk1, kk2;
  long long y, x, u, h, a1, aa, k, t, zz = 0, kl, l, r, odn = 1, m, m0, m3, m4,
                                      xl, xr, yl, yr, i1, i2, a2, i3, nn, x1,
                                      x2, y1, y2, z11, z1, z2, z3, z4;
  string s, s1, s2;
  char ch;
  set<long long> nk;
  l = 0;
  h = 0;
  pi = atan(1) * 4;
  ch = 0;
  bb = 0;
  aa = 0;
  a0 = 0;
  zz = 20000000000;
  k = 0;
  r = 0;
  t = 0;
  j = 0;
  zz = 0;
  k1 = 0;
  k2 = 0;
  kk1 = 0;
  kk2 = 0;
  m3 = 0;
  m4 = 0;
  sum = 0;
  list<int> li;
  list<int>::iterator it[200005], it1;
  {
    cin >> n;
    m2 = 0;
    for (i = 1; i <= 2 * n; i++) {
      cin >> ch;
      if (ch == '-')
        cin >> m4;
      else {
        m2++;
        m4 = -m2;
      }
      li.push_back(m4);
      it1 = li.end();
      it1--;
      if (m4 > 0) {
        it[m4] = it1;
      }
    }
    for (i = 1; i <= n; i++) {
      if (it[i] == li.begin()) {
        cout << "NO";
        return 0;
      }
      it1 = it[i];
      it[i]--;
      zz = *(it[i]);
      if (zz < 0)
        a[-zz] = i;
      else {
        cout << "NO";
        return 0;
      }
      li.erase(it1);
      li.erase(it[i]);
    }
    cout << "YES" << endl;
    for (i = 1; i <= n; i++) {
      cout << a[i] << " ";
    }
  }
  return 0;
}
