x,_,a=eval(input());print((10*(x>=a)))
s=eval(input());print((10*(s>s[2])))
x, _, a = eval(input())
print((10 * (x >= a)))

s = eval(input())
print((10 * (s > s[2])))

-x, _, a = eval(input()) -print((10 * (x >= a))) +s = eval(input()) +print((10 * (s > s[2])))