while 1:print`[hash(a)%3494%3for a in zip(*raw_input().split())]`[1::3]