#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n + 1];
  memset(a, 0, sizeof(a));
  string ans = "YES";
  stack<int> s;
  int dp[2 * n + 1];
  memset(dp, 0, sizeof(dp));
  int add = 0, sub = 0;
  for (int i = 1; i <= 2 * n; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      add++;
      s.push(add);
    } else {
      int temp;
      cin >> temp;
      sub++;
      dp[i] = temp;
      if (s.empty())
        ans = "NO";
      else {
        a[s.top()] = temp;
        s.pop();
      }
    }
  }
  priority_queue<int, vector<int>, greater<int>> pq;
  int j = 1;
  for (int i = 1; i <= 2 * n; i++) {
    if (dp[i] == 0) {
      pq.push(a[j]);
      j++;
    } else {
      if (pq.empty() || pq.top() != dp[i]) {
        ans = "NO";
        break;
      }
      pq.pop();
    }
  }
  cout << ans << endl;
  if (ans == "YES") {
    for (int i = 1; i <= n; i++) cout << a[i] << " ";
    cout << endl;
  }
}
