a=[x for x in input().split()] b=[x for x in input().split()] if a[1]>b[1]: print(a[0]) elif a[1]