#include <bits/stdc++.h>
using namespace std;
const bool MULTIPLE_CASES = 0;
const bool PRINT_CASE_MSG = 0;
const int DOUBLE_PRECISION = 6;
using i64 = long long;
using pii = pair<int, int>;
const i64 INF = (1LL << 60);
const i64 NMAX = 1e5;
void solve() {
  int N;
  cin >> N;
  vector<int> v(N + 5), lef(N + 5);
  for (int i = 1; i <= N + 1; ++i) lef[i] = i;
  bool bad = 0;
  vector<pair<int, int>> ops;
  for (int i = 1, ava = 0; i <= 2 * N; ++i) {
    char c;
    cin >> c;
    if (c == '+') {
      ++ava;
      ops.push_back({1, 0});
      continue;
    }
    int nr;
    cin >> nr;
    ops.push_back({2, nr});
    if (ava <= 0) {
      bad = 1;
    }
    --ava;
  }
  if (bad) {
    cout << "NO\n";
    return;
  }
  vector<int> aaa;
  int nex = 1;
  for (auto [type, nr] : ops) {
    if (type == 1) {
      aaa.push_back(nex);
      ++nex;
    } else {
      v[aaa.back()] = nr;
      aaa.pop_back();
    }
  }
  int bal = 0;
  set<int> vals;
  for (auto [type, nr] : ops) {
    if (type == 1) {
      vals.insert(v[++bal]);
    } else {
      if (*vals.begin() != nr) {
        cout << "NO\n";
        return;
      }
      vals.erase(vals.begin());
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= N; ++i) cout << v[i] << " \n"[i == N];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (DOUBLE_PRECISION > 0) cout << setprecision(DOUBLE_PRECISION) << fixed;
  auto testMessage = [](int id) { return "Case #" + to_string(id) + ": "; };
  int T = 1;
  if (MULTIPLE_CASES) cin >> T;
  for (int t = 1; t <= T; ++t) {
    cout << (PRINT_CASE_MSG ? testMessage(t) : "");
    solve();
  }
}
