#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int cansel_sync = (ios::sync_with_stdio(0), cin.tie(0), 0);
const int N = 200010;
const int inf = ~0u >> 2;
const long long INF = ~0ull >> 2;
long long read() {
  long long x;
  if (scanf("%lld", &x) == -1) exit(0);
  return x;
}
const double pi = acos(-1.0);
double readf() {
  double x;
  if (scanf("%lf", &x) == -1) exit(0);
  return x;
}
template <typename T>
void operator<<(vector<T> &a, T b) {
  a.push_back(b);
}
const long long mod = (1 ? 1000000007 : 998244353);
long long mul(long long a, long long b, long long m = mod) { return a * b % m; }
long long qpow(long long a, long long b, long long m = mod) {
  long long ans = 1;
  for (; b; a = mul(a, a, m), b >>= 1)
    if (b & 1) ans = mul(ans, a, m);
  return ans;
}
vector<int> v;
priority_queue<int, vector<int>, greater<int>> q;
int ans[N];
char s[10];
void Solve() {
  int n = read();
  int f = true;
  for (int i = (0), _ = (n * 2); i < _; i++) {
    scanf("%s", s);
    if (*s == '+')
      v.push_back(i);
    else {
      int x = read();
      if (v.empty())
        f = false;
      else
        ans[v.back()] = x, ans[i] = -x, v.pop_back();
    }
  }
  if (!v.empty()) f = false;
  if (f) {
    for (int i = (0), _ = (n * 2); i < _; i++) {
      if (ans[i] > 0)
        q.push(ans[i]);
      else {
        if (ans[i] + q.top() != 0)
          f = false;
        else
          q.pop();
      }
    }
  }
  if (f) {
    cout << "YES" << endl;
    for (int i = (0), _ = (n * 2); i < _; i++)
      if (ans[i] > 0) cout << ans[i] << ' ';
  } else {
    cout << "NO" << endl;
  }
}
signed main() {
  int T = 1;
  for (int ca = (1), _ = (T + 1); ca < _; ca++) {
    Solve();
  }
  return 0;
}
