#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n, 0);
  stack<long long> b;
  long long idx = 0;
  char ch;
  long long num;
  vector<long long> op(2 * n, 0);
  for (long long i = 0; i < 2 * n; i++) {
    cin >> ch;
    if (ch == '+') {
      b.push(idx);
      idx++;
    } else if (ch == '-') {
      cin >> num;
      op[i] = num;
      if (b.empty()) {
        cout << "NO" << '\n';
        return;
      }
      long long val = b.top();
      a[val] = num;
      b.pop();
    }
  }
  priority_queue<long long> x;
  idx = 0;
  for (long long i = 0; i < 2 * n; i++) {
    if (op[i] == 0) {
      x.push(-a[idx]);
      idx++;
    } else {
      long long val = x.top();
      x.pop();
      if (-val != op[i]) {
        cout << "NO" << '\n';
        return;
      }
    }
  }
  cout << "YES" << '\n';
  for (long long i = 0; i < n; i++) cout << a[i] << " ";
  cout << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
