a,b=map(int,input().split())
f=lambda x:[x,1,x+1,0][x%4]
print(f(b)^f(a-1)) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b f=lambda x:[x,1,x+1,0][x%4] f lambda x:[x,1,x+1,0][x%4] [x,1,x+1,0][x%4] [x,1,x+1,0] x 1 x+1 x 1 0 x%4 x 4 x print(f(b)^f(a-1)) print f(b)^f(a-1) f(b) f b f(a-1) f a-1 a 1 f=lambda x:[x,1,x+1,0][x%4] lambda x:[x,1,x+1,0][x%4] f a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b
a,b=map(int,input().split())
f=lambda x:[x,1,x+1,0][x%4]
print(f(b)^f(a-1))