while 1: m,*s=map(int,input().split()) for n in s:x=m^n;m=n*(m>1>x&x-10))