#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
template <class T>
inline bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
template <class A, class B>
pair<A, B> operator+(const pair<A, B> &p, const pair<A, B> &q) {
  return {p.first + q.first, p.second + q.second};
}
template <class A, class B, class C, class D>
pair<A, B> &operator+=(pair<A, B> &p, const pair<C, D> &q) {
  p.first += q.first;
  p.second += q.second;
  return p;
}
template <class A, class B>
pair<A, B> operator-(const pair<A, B> &p, const pair<A, B> &q) {
  return {p.first - q.first, p.second - q.second};
}
template <class A, class B, class C, class D>
pair<A, B> &operator-=(pair<A, B> &p, const pair<C, D> &q) {
  p.first -= q.first;
  p.second -= q.second;
  return p;
}
template <class A, class B>
istream &operator>>(istream &is, pair<A, B> &p) {
  is >> p.first >> p.second;
  return is;
}
template <class T = ll>
T read() {
  T re;
  cin >> re;
  return move(re);
}
template <class T = ll>
T read(const T &dec) {
  T re;
  cin >> re;
  return re - dec;
}
template <class T = ll>
vector<T> readV(const int sz) {
  vector<T> re(sz);
  for (auto &x : re) x = read<T>();
  return move(re);
}
template <class T = ll>
vector<T> readV(const int sz, const T &dec) {
  vector<T> re(sz);
  for (auto &x : re) x = read<T>(dec);
  return move(re);
}
vv<int> readG(const int &n, const int &m) {
  vv<int> g(n);
  for (int(_) = 0; (_) < (int)(m); ++(_)) {
    const auto a = read<int>(1), b = read<int>(1);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  return move(g);
}
vv<int> readG(const int &n) { return readG(n, n - 1); }
const ll MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(0);
  const auto n = read();
  vector<int> seq(2 * n);
  for (int(i) = 0; (i) < (int)(2 * n); ++(i)) {
    char c;
    cin >> c;
    if (c == '-') cin >> seq[i];
  };
  reverse((seq).begin(), (seq).end());
  vector<int> re;
  vector<int> stk;
  const auto no = []() {
    cout << "NO"
         << "\n";
    exit(0);
  };
  for (const auto x : seq) {
    if (x) {
      if (stk.size() && stk.back() < x) no();
      stk.emplace_back(x);
    } else {
      if (stk.empty()) no();
      re.emplace_back(stk.back());
      stk.pop_back();
    }
  };
  if (stk.size()) no();
  reverse((re).begin(), (re).end());
  cout << "YES"
       << "\n";
  for (int(i) = 0; (i) < (int)(n); ++(i)) cout << re[i] << " \n"[i + 1 == n];
  return 0;
}
