N , M = (map(int , input().split()))
if N < M:
    print(0)
else:
    print(10) N , M = (map(int , input().split())) N map(int , input().split()) map int input().split() ().split () input split M if N < M:
    print(0)
else:
    print(10) N < M N M print(0) print 0 print(10) print 10 N , M = (map(int , input().split())) map(int , input().split()) N M = (map(int , input().split())) map(int , input().split()) M
N , M = (map(int , input().split()))
if N < M:
    print(0)
else:
    print(10)