#include #include using namespace std; typedef pair PIS; typedef pair PIP; PIP clas[10]; int sz; int get_poz(string S){ for(int i=0;ib.first) return true; if(a.first == b.first && a.second.first > b.second.first) return true; if(a.first == b.first && a.second.first == b.second.first && a.second.second < b.second.second) return true; return false; } }; int main(){ for(int i=0;i<6;++i){ string A,B; int x,y; cin >> A >> B >> x >> y; int a=get_poz(A),b=get_poz(B); if(x>y){ clas[a].first += 3; } if(x