#include #include #include #include #include #include #define rep(i,n) for (int i=0; i> a >> pa >> tmp >> b >> pb >> tmp; if (pa.size() > pb.size()) { cout << a << endl; } else if (pa.size() < pb.size()) { cout << b << endl; } else if (a == b) { cout << -1 << endl; } else { rep(i,pa.size()) { if (pa[i] > pb[i]) { cout << a << endl; break; } else if (pa[i] < pb[i]) { cout << b << endl; break; } } } return 0; }