#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  int unknown = 0;
  map<int, int> count;
  set<int, greater<int>> all;
  for (int i = 1; i <= n; ++i) all.insert(i);
  int ans[n], z = -1;
  stack<int> pos;
  memset(ans, -1, sizeof(ans));
  for (int i = 0; i < 2 * n; ++i) {
    string s;
    cin >> s;
    if (s == "+") {
      ++z;
      ++unknown;
      pos.push(z);
    } else {
      int x;
      cin >> x;
      if (unknown) {
        count[x] += unknown;
        unknown = 0;
      }
      if (count.empty() || count.begin()->first > x) {
        cout << "NO\n";
        return 0;
      }
      auto it1 = count.begin();
      if (it1->second == 1)
        count.erase(it1);
      else
        --count[it1->first];
      for (auto it = count.begin(); it != count.end();) {
        auto pp = *it;
        if (pp.first >= x) break;
        auto next = it;
        ++next;
        count[x] += pp.second;
        count.erase(it);
        it = next;
      }
      ans[pos.top()] = x;
      pos.pop();
      all.erase(x);
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; ++i) {
    if (ans[i] == -1) {
      ans[i] = *all.begin();
      all.erase(ans[i]);
    }
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
