#include #include int main(void){ char SA[100], SB[100], PA[100000], PB[100000], XA, XB; scanf("%s %s %c %s %s %c", &SA, &PA, &XA, &SB, &PB, &XB); int a = strlen(PA), b = strlen(PB); int i = 0; if(a>b){ printf("%s\n", SA); }else if(a0){ printf("%s\n", SA); return 0; }else if(strcmp(&PA[i], &PB[i])<0){ printf("%s\n", SB); return 0; } i++; } } printf("-1\n"); return 0; }