It is known that in regular dice, the sum of opposite faces is 7.

A regular dice is rolled and you are given the value X showing on the top face. Determine the value on the bottom face.

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

- The first line will contain T - the number of test cases. Then the test cases follow.
- The first and only of each test case contains a single integer X - the value on the top face.

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

For each test case, output the value on the bottom face.

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

$1 ≤ T ≤ 6$
$1 ≤ X ≤ 6$

----- Sample Input 1 ------ 
3
3
1
6

----- Sample Output 1 ------ 
4
6
1

----- explanation 1 ------ 
Test case-1: The value on the top face is $3$. Therefore, the value on the bottom face is $4$ because $3 + 4 = 7$.

Test case-2: The value on the top face is $1$. Therefore, the value on the bottom face is $6$ because $1 + 6 = 7$.

Test case-3: The value on the top face is $6$. Therefore, the value on the bottom face is $1$ because $6 + 1 = 7$.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for i in range(int(input())):
	x = int(input())
	print(7 - x)


n = int(input())
for i in range(n):
	m = int(input())
	print(7 - m)


n = int(input())
for i in range(0, n):
	x = int(input())
	y = 7 - x
	print(y)


def main():
	t = input()
	for i in range(int(t)):
		num = int(input())
		print(7 - num)
main()


t = int(input())
for i in range(t):
	a = int(input())
	print(7 - a)


for t in range(int(input())):
	print(7 - int(input()))


t = int(input())
for i in range(t):
	n = int(input())
	print(7 - n)


for _ in range(int(input())):
	x = int(input())
	print(7 - x)


for i in range(int(input())):
	n = int(input())
	d = 7
	print(d - n)


for _ in range(int(input())):
	a = int(input())
	print(7 - a)


t = int(input())
for i in range(t):
	A = int(input())
	print(7 - A)


for i in range(int(input())):
	In = int(input())
	print(7 - In)


def dice():
	test = eval(input())
	for i in range(test):
		top_face = eval(input())
		top_face = 7 - top_face
		print(top_face)
dice()


repeat = int(input())
if 1 <= repeat <= 6:
	for item in range(repeat):
		top_face = int(input())
		if 1 <= top_face <= 6:
			print(7 - top_face)


t = int(input())
i = 1
while i <= t:
	i += 1
	x = int(input())
	print(7 - x)


T = int(input())
for i in range(T):
	print(7 - int(input()))


a = int(input())
for i in range(a):
	b = int(input())
	print(7 - b)


for i in range(int(input())):
	x = int(input())
	if x == 1:
		print(6)
	elif x == 2:
		print(5)
	elif x == 3:
		print(4)
	elif x == 4:
		print(3)
	elif x == 5:
		print(2)
	else:
		print(1)


t = int(input())
for _ in range(t):
	x = int(input())
	y = 7 - x
	print(y)


n = int(input())
for i in range(n):
	a = int(input())
	print(7 - a)


for i in range(int(input())):
	p = int(input())
	print(7 - p)


t = int(input())
for i in range(t):
	x = int(input())
	z = 7 - x
	print(z)


for _ in range(int(input())):
	r = int(input())
	n = 7 - r
	print(n)


n = int(input())
for i in range(n):
	n1 = int(input())
	if n1 < 7:
		print(7 - n1)


for _ in range(int(input())):
	num = int(input())
	print(7 - num)


T = int(input())
for i in range(T):
	X = int(input())
	result = 7 - X
	print(result)


T = int(input())
for _ in range(T):
	X = int(input())
	print(7 - X)


for j in range(int(input())):
	x = int(input())
	print(7 - x)


def gbf(a):
	ans = 7 - a
	print(ans)
t = int(input())
for i in range(t):
	x = int(input())
	g = gbf(x)