#include <bits/stdc++.h>
using namespace std;
char c[100010 << 1];
int n, s[100010], top, a[100010 << 1];
int main() {
  cin >> n;
  for (register int i = 1; i <= 2 * n; ++i) {
    cin >> c[i];
    if (c[i] == '-') cin >> a[i];
  }
  for (register int i = 1; i <= 2 * n; ++i) {
    if (c[i] == '+') {
      s[++top] = i;
      continue;
    }
    if (!top) {
      cout << "NO";
      return 0;
    }
    a[s[top]] = a[i];
    top--;
  }
  set<int> se;
  for (register int i = 1; i <= 2 * n; ++i) {
    if (c[i] == '+')
      se.insert(a[i]);
    else {
      if (se.empty() || *se.begin() != a[i]) {
        cout << "NO";
        return 0;
      }
      se.erase(se.begin());
    }
  }
  cout << "YES" << endl;
  for (register int i = 1; i <= 2 * n; ++i)
    if (c[i] == '+') cout << a[i] << " ";
  return 0;
}
