#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, ind = 0, cnt = 0, x;
  char com;
  cin >> n;
  vector<int> gotov, tkr;
  bool nc = 1;
  for (int i = 0; i < 2 * n; ++i) {
    if (cnt < 0) {
      nc = 0;
    }
    cin >> com;
    if (com == '+') {
      cnt++;
      tkr.push_back(i);
      gotov.push_back(1);
    } else {
      cnt--;
      cin >> x;
      if (cnt < 0) {
        nc = 0;
      } else {
        gotov[tkr.back()] = x;
        tkr.pop_back();
        gotov.push_back(-x);
      }
    }
  }
  if (!nc) {
    cout << "NO\n";
    return 0;
  }
  set<int> now;
  for (int i = 0; i < 2 * n; ++i) {
    if (gotov[i] > 0) {
      now.insert(gotov[i]);
    } else {
      if (*now.begin() != -gotov[i]) {
        nc = 0;
        break;
      } else {
        now.erase(now.begin());
      }
    }
  }
  if (!nc) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n; ++i) {
    if (gotov[i] > 0) {
      cout << gotov[i] << ' ';
    }
  }
}
