#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  n *= 2;
  long long arr[n];
  memset(arr, -1, sizeof arr);
  for (long long i = 0; i < n; i++) {
    char c;
    cin >> c;
    if (c == '-') cin >> arr[i];
  }
  stack<long long> ok;
  vector<long long> ans;
  for (long long i = n - 1; i >= 0; i--) {
    if (arr[i] == -1) {
      if (ok.size() == 0) {
        cout << "NO";
        return 0;
      }
      ans.push_back(ok.top());
      ok.pop();
    } else {
      if (ok.size() and arr[i] > ok.top()) {
        cout << "NO";
        return 0;
      }
      ok.push(arr[i]);
    }
  }
  reverse(begin(ans), end(ans));
  cout << "YES\n";
  for (auto x : ans) cout << x << ' ';
  return 0;
}
