There is a 10 \times 10 grid with rows numbered 1 to 10 from top to bottom, and columns 1 to 10 from left to right. Each cell is identified by a pair (r, c) which means that the cell is located at row r and column c.

If Chef's current location is (a,b), then in one move Chef can go to (c,d) if both of the following are satisfied: 
a \neq c
b \neq d

Determine the minimum number of moves required to go from (s_{x}, s_{y}) to (e_{x}, e_{y}).

------ Input Format ------ 

- The first line contains a single integer T — the number of test cases. Then the test cases follow.
- The first and only line of each test case contains four integer s_{x}, s_{y}, e_{x}, e_{y} — the coordinates of the starting and ending cells.

------ Output Format ------ 

For each testcase, output the minimum number of moves required to go from (s_{x}, s_{y}) to (e_{x}, e_{y}).

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ s_{x}, s_{y}, e_{x}, e_{y} ≤ 10$
$(s_{x},s_{y}) \neq (e_{x},e_{y})$

----- Sample Input 1 ------ 
4
1 2 9 8
5 5 5 7
8 6 6 8
3 10 8 10

----- Sample Output 1 ------ 
1
2
1
2

----- explanation 1 ------ 
Test case 1: Chef can go from $(1, 2)$ to $(9, 8)$ in one move since $1 \neq 9$ and $2 \neq 8$.

Test case 2: Chef will require at least two moves. One such sequence of moves is $(5, 5) \rightarrow (2, 3) \rightarrow (5, 7)$.

Difficulty: EASY

Solutions:
t = int(input())
for i in range(t):
	(a, b, c, d) = map(int, input().split())
	if a == c or b == d:
		print('2')
	elif a != c and b != d:
		print('1')


t = int(input())
for i in range(0, t):
	(sx, sy, ex, ey) = map(int, input().split(' '))
	if sx != ex and sy != ey:
		print('1')
	else:
		print('2')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a != c and b != d:
		print(1)
	else:
		print(2)


t = int(input())
for i in range(t):
	(s1, s2, e1, e2) = map(int, input().split())
	if s1 != e1 and s2 != e2:
		print(1)
	else:
		print(2)


T = int(input())
for i in range(T):
	(s1, s2, e1, e2) = map(int, input().split())
	if s1 == e1 or s2 == e2:
		print('2')
	else:
		print('1')


for _ in range(int(input())):
	(Sx, Sy, Ex, Ey) = map(int, input().split())
	print(1 if Sx != Ex and Sy != Ey else 2)


t = int(input())
for i in range(t):
	(a1, a2, b1, b2) = map(int, input().split())
	if a1 != b1 and a2 != b2:
		print(1)
	else:
		print(2)


for i in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a == c or b == d:
		print('2')
	else:
		print('1')


T = int(input())
for i in range(0, T):
	(sx, sy, ex, ey) = map(int, input().split())
	if sx == ex or sy == ey:
		print('2')
	else:
		print('1')


for i in range(int(input())):
	(p, x, y, z) = map(int, input().split())
	if p != y and x != z:
		print(1)
	else:
		print(2)


test_case = int(input())
while test_case > 0:
	(sx, sy, ex, ey) = map(int, input().split())
	if sx != ex and sy != ey:
		print(1)
	else:
		print(2)
	test_case -= 1


for i in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a != c and b != d:
		print('1')
	elif a == c and b == d:
		print('3')
	else:
		print('2')


n = int(input())
for i in range(n):
	(a, b, c, d) = list(map(int, input().split()))
	if a != c and b != d:
		print('1')
	else:
		print('2')


for i in range(int(input())):
	(w, x, y, z) = map(int, input().split())
	if w == y or x == z:
		print(2)
	else:
		print(1)


t = int(input())
for _ in range(t):
	columns = list(map(int, input().split(' ')))
	changes = lambda x: 1 if x[0] != x[2] and x[1] != x[3] else 2
	print(changes(columns))


t = int(input())
for _ in range(t):
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 != x2 and y1 != y2:
		print(1)
	else:
		print(2)


for _ in range(int(input())):
	(sx, sy, ex, ey) = map(int, input().split())
	print(1) if sx != ex and sy != ey else print(2)


T = int(input())
for T in range(0, T):
	(Sx, Sy, Ex, Ey) = input().split()
	Sx = int(Sx)
	Sy = int(Sy)
	Ex = int(Ex)
	Ey = int(Ey)
	if Sx != Ex or Sy != Ey:
		if Sx == Ex and Sy != Ey:
			print('2')
		elif Sx != Ex and Sy == Ey:
			print('2')
		elif Sx != Ex and Sy != Ey:
			print('1')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	(sx, sy, ex, ey) = a
	if sx != ex and sy != ey:
		print(1)
	elif sx == ex and sy == ey:
		print(3)
	else:
		print(2)


t = int(input())
for i in range(t):
	(x, y, a, b) = map(int, input().split())
	if x != a and y != b:
		print(1)
	else:
		print(2)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if l[0] != l[2] and l[1] != l[3]:
		print(1)
	else:
		print(2)


t = int(input())
while t:
	t -= 1
	(a, b, c, d) = map(int, input().split())
	if a == c or b == d:
		print(2)
		continue
	print(1)


T = int(input())
for _ in range(T):
	(a, b, c, d) = map(int, input().split())
	if a == c or b == d:
		print('2')
	elif a != c and b != d:
		print('1')


t = int(input())
for i in range(t):
	(Sx, Sy, Ex, Ey) = map(int, input().split())
	if Sx == Ex or Sy == Ey:
		print('2')
	else:
		print('1')


a = int(input())
for i in range(a):
	b = [int(x) for x in input().split()]
	if b[0] != b[2] and b[1] != b[3]:
		print(1)
	else:
		print(2)


for i in range(int(input(' '))):
	(s1, s2, e1, e2) = map(int, input().split())
	add = 0
	if s1 != e1 and s2 != e2:
		add += 1
	elif s1 != e1 or s2 != e2:
		add += 2
	print(add)