n, m =map(int,input().split())
if n >= m:
    print("10")
else:
    print("0") n, m =map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m if n >= m:
    print("10")
else:
    print("0") n >= m n m print("10") print "10" print("0") print "0" m =map(int,input().split()) map(int,input().split()) m n, m =map(int,input().split()) map(int,input().split()) n
n, m =map(int,input().split())
if n >= m:
    print("10")
else:
    print("0")
