#include #include char SA[101]; char SB[101]; char PA[10001]; char PB[10001]; int main(void) { int order; scanf("%s %s %*s %s %s %*s", SA, PA, SB, PB); order = strcmp(PA, PB); printf("%s\n", order > 0 ? SA : order < 0 ? SB : "-1"); return 0; }