#include #include using namespace std; int yeslist[9]; int nolist[9]; int cnt; int main(){ int N; cin>>N; for(int i=0;i>a>>b>>c>>d>>str; if(str == "YES"){ cnt++; yeslist[a-1]++; yeslist[b-1]++; yeslist[c-1]++; yeslist[d-1]++; }else{ nolist[a-1] |= 1; nolist[b-1] |= 1; nolist[c-1] |= 1; nolist[d-1] |= 1; } } for(int i=0;i<9;i++){ if(yeslist[i] == cnt && !nolist[i]){ cout<