#include<iostream.h> #include<string.h> void main() { char a[100],b[100]; int i,j; cin>>a>>b; i=strlen(a)-1; j=strlen(b)-1; while(a[i]==b[j]) { i--; j--; } cout<<a+i+1; }