#include <bits/stdc++.h>
inline long long read() {
  long long sign = 1;
  long long x = 0;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') sign = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * sign;
}
inline void wonl() { putchar('\n'); }
inline void ww(long long k) {
  if (k < 0) putchar('-'), k *= -1;
  char ch[20];
  int num = 0;
  while (k) ch[++num] = k % 10, k /= 10;
  if (num == 0) ch[++num] = 0;
  while (num) putchar(ch[num--] + '0');
}
using namespace std;
const int N = 2e5 + 4;
template <typename T, typename... V>
inline void wonl(T t, V... v) {
  ww(t);
  if (sizeof...(v)) putchar(' ');
  wonl(v...);
}
void solve() {
  int n;
  cin >> n;
  vector<pair<char, int>> arr;
  for (int i = 0; i < 2 * n; i++) {
    int x = 0;
    char c;
    cin >> c;
    if (c == '-') cin >> x;
    arr.push_back({c, x});
  }
  reverse(arr.begin(), arr.end());
  stack<int> s;
  vector<int> ans;
  for (auto i : arr) {
    if (i.first == '+') {
      if (s.empty()) {
        cout << "NO" << endl;
        return;
      }
      ans.push_back(s.top());
      s.pop();
    } else {
      if (!s.empty() && s.top() < i.second) {
        cout << "NO" << endl;
        return;
      }
      s.push(i.second);
    }
  }
  cout << "YES" << endl;
  reverse(ans.begin(), ans.end());
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
