#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
const int N=3e5+100;
vector<pii> v;
int j;
int now;
int a[N];
bool f=true;
int ans[N];
int main(){
int n;cin>>n;
n*=2;
for(int i=1;i<=n;i++){
char c;cin>>c;
if(c=='+'){
v.push_back({now,++j});
a[now]=0;
}
else{
int x;cin>>x;
if(!v.size()){
f=false;continue;
}
pii t=v.back();
if(a[t.first]>x){
f=false;
}
a[t.first]=x;
ans[t.second]=x;
now++;
v.pop_back();
}
}
if(f) {
puts("YES");
for(int i=1;i<=n/2;i++){
cout<<ans[i];
i==n?cout<<"\n":cout<<" ";
}
}
else puts("NO");
return 0;
}