Alice has a standard deck of 52 cards. She wants to play a card game with K-1 of her friends. This particular game requires each person to have an equal number of cards, so Alice needs to discard a certain number of cards from her deck so that she can equally distribute the remaining cards amongst her and her friends. 

Find the minimum number of cards Alice has to discard such that she can play the game. 

Note: It doesn't matter which person gets which card. The only thing that matters is that each person should have an equal number of cards.

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

- The first line of input contains a single integer T, denoting the number of test cases. The description of T test cases follows.
- Each test case consists of a single line of input, containing a single integer K — the number of people playing the game (including Alice).

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

- For each test case, output in a single line the minimum number of cards Alice has to discard from her deck such that she can play the game with her friends.

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

$1 ≤ T ≤ 51$
$2 ≤ K ≤ 52$

----- Sample Input 1 ------ 
4
3
50
2
14

----- Sample Output 1 ------ 
1
2
0
10

----- explanation 1 ------ 
Test Case $1$: Alice can discard any single card which will leave her with $51$ cards. She can then give her friends and herself $17$ cards each.

Test Case $2$: Alice can discard any $2$ cards and then give $1$ card each to her friends and herself. 

Test Case $3$: Alice need not discard any card and can give $26$ cards each to her friend and herself.

Test Case $4$: Alice can discard any $10$ cards and then give $3$ cards each to her friends and herself.

Difficulty: EASY

Starter code:

Solutions:
for i in range(int(input())):
	people = int(input())
	cards = 52
	while cards > 0:
		if cards % people == 0:
			print(52 - cards)
			break
		else:
			cards -= 1


for i in range(int(input())):
	k = int(input())
	n = temp = 52
	while n > 0:
		if n % k == 0:
			break
		n = n - 1
	print(temp - n)


for i in range(int(input())):
	n = int(input())
	print(52 % n)


for _testcase in range(int(input())):
	n = int(input())
	print(52 % n)


t = int(input())
while t > 0:
	K = int(input())
	print(52 - 52 // K * K)
	t -= 1


for _ in range(int(input())):
	k = int(input())
	t = 52 % k
	print(t)


for _ in range(int(input())):
	a = int(input())
	print(52 % a)


for i in range(int(input())):
	k = int(input())
	print(52 % k)


t = int(input())
for i in range(t):
	n = int(input())
	a = 52
	count = 0
	while a % n != 0:
		count += 1
		a = a - 1
	print(count)


t = int(input())
for bunny in range(t):
	k = int(input())
	print(52 % k)


for x in range(int(input())):
	n = int(input())
	print(52 % n)


t = int(input())
for i in range(t):
	x = int(input())
	print(52 % x)


for turn in range(int(input())):
	print(52 % int(input()))


for t in range(int(input())):
	a = int(input())
	print(52 % a)


for t in range(int(input())):
	players = int(input())
	print(52 % players)
	pass


for i in range(0, int(input())):
	a = int(input())
	print(52 % a)


t = int(input())
for i in range(t):
	k = int(input())
	if 52 % k == 0:
		print('0')
	else:
		print(52 % k)


for _ in range(int(input())):
	n = int(input())
	print(52 % n)


for _ in range(int(input())):
	k = int(input())
	ans = 52 // k
	print(52 - k * ans)


try:
	for i in range(int(input())):
		k = int(input())
		print(52 % k)
except:
	pass


for _ in range(int(input())):
	x = int(input())
	total = 52 - int(52 / x) * x
	print(total)


x = int(input())
for _ in range(x):
	x = int(input())
	z = 52 // x
	print(52 - z * x)


for t in range(int(input())):
	n = int(input())
	v = 52 // n
	v1 = 52 - n * v
	print(v1)


test = int(input())
for I in range(test):
	n = int(input())
	print(52 % n)


a = []
for i in range(int(input())):
	a.append(int(input()))
for i in a:
	n = 52
	while 1:
		if n % i == 0:
			break
		else:
			n -= 1
	print(52 - n)


t = int(input())
for i in range(t):
	k = int(input())
	r = 52 % k
	print(int(r))


for _ in range(int(input())):
	ppl = int(input())
	list1 = list(range(1, 53))
	list1.reverse()
	for x in list1:
		if x % ppl == 0:
			print(52 - x)
			break


for i in range(int(input())):
	x = int(input())
	c = 52 % x
	b = 0
	n = 52
	while c != 0:
		n = n - 1
		c = n % x
		b = b + 1
	print(b)


t = int(input())
while t > 0:
	t -= 1
	k = int(input())
	s = 52 % k
	print(s)


t = int(input())
for i in range(t):
	k = int(input())
	s = 52 % k
	print(s)


T = int(input())
for i in range(T):
	K = int(input())
	K1 = K
	i = 52
	while i % K != 0:
		i = i - 1
	print(52 - i)


t = int(input())
while t > 0:
	n = int(input())
	print(52 % n)
	t = t - 1


t = int(input())
for r in range(t):
	x = int(input())
	print(52 % x)


for _ in range(int(input())):
	k = int(input())
	r = 52 % k
	print(r)


x = int(input())
for i in range(x):
	cards = 52
	total_num = int(input())
	for j in range(cards, 0, -1):
		if j % total_num == 0:
			print(cards - j)
			break


t = int(input())
for _ in range(t):
	k = int(input())
	c = 52
	r = 0
	for _ in range(1000):
		if c % k != 0:
			c -= 1
			r += 1
		else:
			print(r)
			break


for T in range(int(input())):
	k = int(input())
	print(52 % k)


tc = int(input())
for _ in range(tc):
	k = int(input())
	print(52 % k)