#include #include #include #include #include using namespace std; int main(){ string name[2]; string score[2]; string te[2]; cin >> name[0] >> score[0] >> te[0]; cin >> name[1] >> score[1] >> te[1]; score[0] += (char)0; score[1] += (char)0; if(score[0] > score[1]){ cout << name[0] << endl; }else if(score[0] < score[1]){ cout << name[1] << endl; }else{ cout << -1 << endl; } return 0; }