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