#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& it : v) is >> it;
  return is;
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> second) {
  os << "{ ";
  for (auto s : second) os << s << " ";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " |";
  __f(comma + 1, args...);
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> queries(2 * n);
  for (long long i = 0; i < 2 * n; ++i) {
    char op;
    cin >> op;
    if (op == '+') continue;
    long long x;
    cin >> x;
    queries[i] = x;
  }
  stack<long long> stk;
  vector<long long> ans;
  for (long long i = 2 * n - 1; i >= 0; --i) {
    if (queries[i] == 0) {
      if (stk.empty()) {
        cout << "NO\n";
        return;
      }
      ans.push_back(stk.top());
      stk.pop();
    } else {
      if (stk.empty() or queries[i] < stk.top()) {
        stk.push(queries[i]);
      } else {
        cout << "NO\n";
        return;
      }
    }
  }
  cout << "YES\n";
  reverse(ans.begin(), ans.end());
  for (long long i : ans) cout << i << " ";
  cout << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
