#include #include #include using namespace std; int main(){ string SA,SB,PA,PB,XA,XB; cin>>SA>>PA>>XA; cin>>SB>>PB>>XB; if(PA==PB) cout<<"-1"<PB) cout<