#include <bits/stdc++.h>
using namespace std;
int N;
map<int, int> m;
vector<int> st;
int res[100101];
int main() {
  scanf("%d", &N);
  int cnt = 0;
  for (int i = 1; i <= N + N; i++) {
    char t;
    scanf("\n%c", &t);
    if (t == '+') {
      m[1]++;
      st.push_back(++cnt);
    } else {
      int x;
      scanf("%d", &x);
      if (m.empty()) return !printf("NO");
      while (m.begin()->first < x) {
        m[x] += m.begin()->second;
        m.erase(m.begin());
      }
      if (m.find(x) == m.end()) return !printf("NO");
      if (--m[x] == 0) m.erase(x);
      assert(!st.empty());
      res[st.back()] = x;
      st.pop_back();
    }
  }
  printf("YES\n");
  for (int i = 1; i <= N; i++) printf("%d ", res[i]);
  return 0;
}
