for i in range(32): s = input() print(+(s[0]>s[1]))