#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("popcnt")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<char, int>> arr;
  for (int i = 0; i < 2 * n; i++) {
    char sym;
    cin >> sym;
    int tmp;
    if (sym == '+') {
      tmp = 1;
    } else {
      cin >> tmp;
    }
    arr.emplace_back(sym, tmp);
  }
  reverse(arr.begin(), arr.end());
  stack<int> mys;
  string s = "YES";
  vector<int> ans;
  for (int i = 0; i < int(arr.size()); i++) {
    char sym;
    int x;
    tie(sym, x) = arr[i];
    if (sym == '+') {
      if (mys.empty()) {
        s = "NO";
        break;
      }
      ans.push_back(mys.top());
      mys.pop();
    } else {
      if (!mys.empty() && mys.top() < x) {
        s = "NO";
        break;
      }
      mys.push(x);
    }
  }
  cout << s << "\n";
  if (s == "YES") {
    reverse(ans.begin(), ans.end());
    for (auto ele : ans) {
      cout << ele << " ";
    }
  }
}
