#include <bits/stdc++.h>
int main() {
  int n;
  bool ok = true;
  std::cin >> n;
  std::pair<char, int> p[n << 1];
  for (int i = 0; i < (n << 1); i++) {
    std::cin >> p[i].first;
    if (p[i].first == '-') {
      std::cin >> p[i].second;
      if (i > 0 && p[i - 1].first == '-' && p[i - 1].second > p[i].second)
        ok = false;
    }
  }
  if (!ok) {
    std::cout << "NO\n";
    return 0;
  }
  int ans[n], i = n - 1;
  std::stack<int> s;
  for (int j = (2 * n) - 1; j >= 0; j--) {
    if (p[j].first == '+') {
      if (s.empty()) {
        ok = false;
        break;
      }
      ans[i] = s.top();
      s.pop();
      if (j < (2 * n) - 1 && p[j + 1].first == '+' && ans[i + 1] > ans[i]) {
        ok = false;
        break;
      }
      i--;
    } else
      s.push(p[j].second);
  }
  if (!ok || !s.empty())
    std::cout << "NO\n";
  else {
    std::cout << "YES\n";
    for (int x : ans) std::cout << x << " ";
  }
  return 0;
}
