#include <bits/stdc++.h>
using namespace std;
int debug = 0;
void fail() {
  puts("NO");
  exit(0);
}
int main() {
  int n;
  vector<array<int, 2>> a;
  cin >> n;
  for (int i = 0; i < 2 * n; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      a.push_back({1, 0});
    } else {
      int x;
      cin >> x;
      a.push_back({-1, x});
    }
  }
  reverse(a.begin(), a.end());
  set<int> cur;
  vector<int> ans;
  for (auto [t, x] : a) {
    if (t == -1) {
      if (!cur.empty() && x > *cur.begin()) fail();
      cur.insert(x);
    } else {
      if (cur.empty()) fail();
      int y = *cur.begin();
      ans.push_back(y);
      cur.erase(y);
    }
  }
  reverse(ans.begin(), ans.end());
  puts("YES");
  for (int i : ans) {
    cout << i << ' ';
  }
  cout << '\n';
}
