#include <bits/stdc++.h>
constexpr int N = 100005;
int n;
std::string s;
struct op {
  int opt, val;
} a[N << 1];
int ans[N];
std::stack<int> stk;
int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(nullptr);
  std::cin >> n;
  for (int i = 1; i <= n << 1; ++i) {
    std::cin >> s;
    if (s[0] == '+')
      a[i].opt = 1;
    else {
      std::cin >> a[i].val;
      a[i].opt = 2;
    }
  }
  int top = 0;
  for (int i = 1; i <= n << 1; ++i)
    if (a[i].opt == 1)
      ++top;
    else if (!top)
      return std::cout << "NO" << std::endl, 0;
    else
      --top;
  int now = n;
  for (int i = n << 1; i; --i)
    if (a[i].opt == 1)
      ans[now--] = stk.top(), stk.pop();
    else if (!stk.empty() && a[i].val > stk.top())
      return std::cout << "NO" << std::endl, 0;
    else
      stk.push(a[i].val);
  std::cout << "YES" << std::endl;
  for (int i = 1; i <= n; ++i) std::cout << ans[i] << ' ';
  std::cout << std::endl;
  return 0;
}
