#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int32_t n;
  std::cin >> n;
  std::deque<std::pair<int32_t, int32_t> > dq;
  bool ok = true;
  int32_t nxt = 1;
  std::vector<int32_t> ans(n + 1);
  for (int32_t i = 0; i < 2 * n; i++) {
    char t;
    std::cin >> t;
    if (t == '-') {
      int32_t x;
      std::cin >> x;
      if (!ok) {
        continue;
      }
      if (dq.empty()) {
        ok = false;
        continue;
      }
      if (dq.front().second > x && dq.back().second > x) {
        ok = false;
        continue;
      }
      if (dq.front().second <= x) {
        ans[dq.front().first] = x;
        dq.pop_front();
        if (!dq.empty()) {
          dq.front().second = std::max(x + 1, dq.front().second);
          dq.back().second = std::max(x + 1, dq.back().second);
        }
      } else {
        ans[dq.back().first] = x;
        dq.pop_back();
        if (!dq.empty()) {
          dq.front().second = std::max(x + 1, dq.front().second);
          dq.back().second = std::max(x + 1, dq.back().second);
        }
      }
    } else {
      if (!ok) {
        continue;
      }
      dq.push_back({nxt++, -1});
    }
  }
  if (!ok) {
    std::cout << "NO" << '\n';
  } else {
    std::cout << "YES" << '\n';
    for (int32_t i = 1; i <= n; i++) {
      std::cout << ans[i] << " ";
    }
    std::cout << '\n';
  }
}
