#include using namespace std; int main() { int i; int iLenA; int iLenB; char lpNameA[ 110 ]; char lpNameB[ 110 ]; char S[ 110 ]; char A[ 10100 ]; char B[ 10100 ]; cin >> lpNameA; cin >> A; cin >> S; cin >> lpNameB; cin >> B; iLenA = strlen( A ); iLenB = strlen( B ); do { if( iLenA > iLenB ) cout << lpNameA << endl; else if( iLenA < iLenB ) cout << lpNameB << endl; else break; } while( false ); i = strcmp( A, B ); if( i > 0 ) cout << lpNameA << endl; else if( i < 0 ) cout << lpNameB << endl; else cout << - 1 << endl; return 0; }