#include using namespace std; int main() { string sa, sb, pa, pb, ans = "-1"; char c; cin >> sa >> pa >> c >> sb >> pb >> c; if (pa.length() > pb.length()) ans = sa; else if (pa.length() == pb.length()) { int i = 0; while (i < pa.length()) { if (pa[i] > pb[i]) { ans = sa; break; } else if (pa[i] < pb[i]) { ans = sb; break; } i++; } } else ans = sb; cout << ans << endl; return 0; }