#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, i, a[N], st[N], w, b[N], bx;
char op[N][9];
int main() {
  cin >> n;
  for (i = 1; i <= 2 * n; ++i) {
    cin >> op[i];
    if (*op[i] == '-') cin >> a[i];
  }
  for (i = 2 * n; i; --i) {
    if (*op[i] == '-') {
      if (w && a[i] > st[w]) {
        cout << "NO";
        return 0;
      }
      st[++w] = a[i];
    } else {
      b[++bx] = st[w--];
    }
  }
  cout << "YES" << endl;
  for (i = n; i; --i) {
    cout << b[i] << " ";
  }
  return 0;
}
