a,b=map(int,input().split())
if a>=b:
  print('10')
else:
  print('0') a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b if a>=b:
  print('10')
else:
  print('0') a>=b a b print('10') print '10' print('0') print '0' b=map(int,input().split()) map(int,input().split()) b a,b=map(int,input().split()) map(int,input().split()) a
a,b=map(int,input().split())
if a>=b:
  print('10')
else:
  print('0')
