#include #include int main(){ char A[15],B[15]; int i; scanf("%s %s",A,B); for(i=0;;i++){ if((A[i]=='4')&&(B[i]=='7')){ printf("%s\n",A); return 0; } else if((A[i]=='7')&&(B[i]=='4')){ printf("%s\n",B); return 0; } else if(A[i]>B[i]){ printf("%s\n",A); return 0; } else if (A[i]