#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using ll = long long;
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<char, int>> instr;
  for (int i = 0; i < n * 2; i++) {
    getchar();
    char c = getchar();
    if (c == '+') {
      instr.push_back({'+', 0});
    } else {
      int num;
      scanf("%d", &num);
      instr.push_back({'-', num});
    }
  }
  vector<int> st;
  vector<int> answer;
  bool ok = true;
  for (int i = 2 * n - 1; i >= 0; --i) {
    char c = instr[i].first;
    int num = instr[i].second;
    if (c == '+') {
      if (st.empty()) {
        ok = false;
        break;
      }
      answer.push_back(st.back());
      st.pop_back();
    } else {
      if (!st.empty() && st.back() < num) {
        ok = false;
        break;
      }
      st.push_back(num);
    }
  }
  if (ok) {
    puts("YES");
    for (int i = n - 1; i >= 0; --i) {
      printf("%d ", answer[i]);
    }
  } else {
    puts("NO");
  }
}
