#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, mod = 1e9 + 7;
void solve() {
  int n, a[N];
  char st[2 * N];
  cin >> n;
  stack<char> stk;
  set<pair<int, int> > s;
  int num = -1;
  int k = -1;
  for (int z = 0; z < (int)2 * n; ++z) {
    char c;
    cin >> c;
    st[z] = c;
    if (c == '+') {
      num++;
      stk.push('+');
    } else {
      k++;
      if (stk.empty()) {
        cout << "NO"
             << "\n";
        return;
      }
      int x;
      cin >> x;
      a[k] = x;
      s.insert({x, num});
      stk.pop();
    }
  }
  int ans[N];
  memset(ans, 0, sizeof(ans));
  set<int> s2, index;
  for (int i = 0; i < n; i++) {
    index.insert(i);
  }
  for (auto i : s) {
    auto it = index.upper_bound(i.second);
    --it;
    ans[*it] = i.first;
    index.erase(it);
  }
  int p = -1, q = -1;
  for (int i = 0; i < 2 * n; i++) {
    if (st[i] == '+') {
      p += 1;
      s2.insert(ans[p]);
    } else {
      q++;
      if (*s2.begin() != a[q]) {
        cout << "NO"
             << "\n";
        return;
      }
      s2.erase(s2.begin());
    }
  }
  cout << "YES"
       << "\n";
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  int a = 1;
  while (t--) {
    solve();
    a += 1;
  }
}
