#include #include using namespace std; int count(char a[]){ int i=0; while(a[i] != '\0'){ i++; } return i; } int main(){ char name[2][102]; char point[2][10002] = {0}; char te[2][10]; for(int i=0; i<2; i++){ cin >> name[i]; cin >> point[i]; cin >> te[i]; } if(count(point[0]) > count(point[1])){ cout << name[0] << endl; return 0; }else if(count(point[0]) < count(point[1])){ cout << name[1] << endl; return 0; }else{ int i = 0; while(point[0][i] == point[1][i] && i < 10001){ i++; } if(point[0][i] > point[1][i]){ cout << name[0] << endl; }else if(point[0][i] < point[1][i]){ cout << name[1] << endl; }else{ cout << -1 << endl; } } return 0; }