#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using pi = pair<int, int>;
const int mod = 998244353;
const ll inf = ll(1e18);
const double PI = acos(-1), eps = 1e-9;
const int mxa = 2e3;
ll ncr[mxa + 5][mxa + 5];
void init() {
  for (int i = 0; i <= mxa; ++i) {
    ncr[i][i] = ncr[i][0] = 1;
    for (int j = 1; j < i; ++j) {
      ncr[i][j] = (ncr[i - 1][j - 1] + ncr[i - 1][j]) % mod;
    }
  }
}
const int mxn = 1e5, mxk = 2e3;
int n;
string second[2 * mxn];
void solve() {
  cin >> n;
  cin.ignore();
  vi ans(n);
  int pos = 0, mn = 0;
  priority_queue<int> pq;
  for (int i = 0; i < 2 * n; ++i) {
    getline(cin, second[i]);
    if (second[i][0] == '+') {
      pq.push(pos++);
      mn = 0;
    } else {
      int x = stoi(second[i].substr(2, (int)(second[i]).size() - 2));
      if (pq.empty() || x < mn) {
        cout << "NO\n";
        return;
      }
      ans[pq.top()] = x;
      pq.pop();
      mn = x;
    }
  }
  int i = 0;
  for (int j = 0; j < 2 * n; ++j) {
    if (second[j][0] == '+')
      pq.push(-(ans[i++]));
    else {
      int x = stoi(second[j].substr(2, (int)(second[j]).size() - 2));
      if (pq.top() != -x) {
        cout << "NO\n";
        return;
      }
      pq.pop();
    }
  }
  cout << "YES\n";
  for (const int x : ans) cout << x << ' ';
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  t = 1;
  while (t-- > 0) solve();
}
