#include #include int main(void){ int ret; char nameA[110], nameB[110]; char pointA[11000], pointB[11000]; char handA[10], handB[10]; scanf("%s %s %s", nameA, pointA, handA); scanf("%s %s %s", nameB, pointB, handB); if( strlen(pointA) > strlen(pointB) ){ printf("%s\n", nameA); }else if( strlen(pointA) < strlen(pointB) ){ printf("%s\n", nameB); }else{ if( strlen(pointA) == strlen(pointB) ){ ret = strcmp(pointA, pointB); if( ret > 0 ){ printf("%s\n", nameA); }else if(ret < 0){ printf("%s\n", nameB); }else{ printf("-1\n"); } } } return 0; }