#include using namespace std; using ll=long long; int main(){ ll n; cin>>n; vector> G(n); for(ll i=0;i s(n); for(ll i=0;i>s[i]; } queue que; que.push(0); vector ans(n); if(s[0]=="Yes"){ ans[0]="Yes"; }else{ ans[0]="No"; } while(que.size()){ ll q=que.front(); que.pop(); for(ll u:G[q]){ que.push(u); if(s[u]=="Yes"){ if(ans[q]=="Yes"){ ans[u]="Yes"; }else{ ans[u]="No"; } }else{ if(ans[q]=="Yes"){ ans[u]="No"; }else{ ans[u]="Yes"; } } } } for(ll i=0;i