#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 14;
int n, what[maxn];
char t[maxn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  n *= 2;
  stack<int> s;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] == '+')
      s.push(i);
    else if (s.empty())
      return cout << "NO\n", 0;
    else {
      cin >> what[i];
      what[s.top()] = what[i];
      s.pop();
    }
  }
  set<int> bag;
  for (int i = 0; i < n; i++)
    if (t[i] == '+')
      bag.insert(what[i]);
    else if (*bag.begin() != what[i])
      return cout << "NO\n", 0;
    else
      bag.erase(bag.begin());
  cout << "YES\n";
  for (int i = 0; i < n; i++)
    if (t[i] == '+') cout << what[i] << ' ';
  cout << '\n';
}
