#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void prn(Arg1&& arg1) {
  cout << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void prn(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  prn(args...);
}
template <typename Arg1>
void prs(Arg1&& arg1) {
  cout << arg1 << " ";
}
template <typename Arg1, typename... Args>
void prs(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  prs(args...);
}
template <typename Arg1>
void read(Arg1&& arg1) {
  cin >> arg1;
}
template <typename Arg1, typename... Args>
void read(Arg1&& arg1, Args&&... args) {
  cin >> arg1;
  read(args...);
}
void solve() {
  int n;
  read(n);
  vector<int> ops(2 * n);
  for (int i = 0; i < 2 * n; ++i) {
    char typ;
    read(typ);
    if (typ == '+') {
      ops[i] = -1;
    } else {
      int x;
      read(x);
      ops[i] = x;
    }
  }
  reverse(ops.begin(), ops.end());
  (ops);
  vector<int> active, ans;
  for (auto i : ops) {
    if (i <= 0) {
      if (active.empty()) {
        prn("NO");
        return;
      }
      ans.push_back(active.back());
      active.pop_back();
      continue;
    }
    if (!active.empty() && active.back() < i) {
      prn("NO");
      return;
    }
    active.push_back(i);
  }
  prn("YES");
  reverse(ans.begin(), ans.end());
  for (auto i : ans) {
    prs(i);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int tc = 1; tc <= t; ++tc) {
    solve();
  }
  return 0;
}
