#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> ans(n);
  stack<int> sk;
  vector<pair<int, int>> opt;
  bool pos = true;
  for (int x = 0, jp = 0; x < 2 * n && pos; x++) {
    char c;
    cin >> c;
    if (c == '+') {
      opt.push_back({1, jp});
      sk.push(jp++);
    } else {
      int i;
      cin >> i;
      if (sk.empty())
        pos = false;
      else {
        ans[sk.top()] = i;
        sk.pop();
      }
      opt.push_back({-1, i});
    }
  }
  priority_queue<int, vector<int>, greater<int>> pq;
  for (auto [m, i] : opt) {
    if (m == 1)
      pq.push(ans[i]);
    else {
      if (pq.empty() || pq.top() != i) {
        pos = false;
        break;
      }
      pq.pop();
    }
  }
  if (!pos)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (auto &i : ans) cout << i << " ";
  }
  return 0;
}
