#include #include #include #include #include using namespace std; int main(){ string s1,s2,a1,a2; char none; bool flag=false; cin >> s1 >> a1 >> none >> s2 >> a2 >> none; if(a1.size()==a2.size()){ for(int i=0;ia2[i]){ cout << s1; flag = true; break; } } } else if(a1.size()>a2.size()){ cout << s1; } else{ cout << s2; } if(!flag) cout << -1; return 0; }