s,p,x=map(str,input().split()) S,P,X=map(str,input().split()) p=int(p);P=int(P) if p>P: print(s) elif p