#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, num, ans[N];
bool flag = false;
stack<int> stk;
char key;
int main() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    cin >> key;
    if (key == '+') {
      stk.push(++num);
    } else {
      int x;
      cin >> x;
      if (stk.empty() || x < ans[stk.top() + 1]) puts("NO"), exit(0);
      ans[stk.top()] = x;
      stk.pop();
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  puts("");
  return 0;
}
