You are given the sequence of Nucleotides of one strand of DNA through a string S of length N. S contains the character A, T, C, and G only.

Chef knows that:
A is complementary to T.
T is complementary to A.
C is complementary to G.
G is complementary to C.

Using the string S, determine the sequence of the complementary strand of the DNA.

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

- First line will contain T, number of test cases. Then the test cases follow.
- First line of each test case contains an integer N - denoting the length of string S.
- Second line contains N characters denoting the string S.

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

For each test case, output the string containing N characters - sequence of nucleotides of the complementary strand.

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

$1 ≤ T ≤ 100$
$1 ≤ N ≤ 100$
$S$ contains A, T, C, and G only

----- Sample Input 1 ------ 
4
4
ATCG
4
GTCC
5
AAAAA
3
TAC

----- Sample Output 1 ------ 
TAGC
CAGG
TTTTT
ATG

----- explanation 1 ------ 
Test case $1$: Based on the rules, the complements of A, T, C, and G are T, A, G, and C respectively. Thus, the complementary string of the given string ATCG is TAGC.

Test case $2$: Based on the rules, the complements of G, T, and C are C, A, and G respectively. Thus, the complementary string of the given string GTCC is CAGG.

Test case $3$: Based on the rules, the complement of A is T. Thus, the complementary string of the given string AAAAA is TTTTT.

Test case $4$: Based on the rules, the complements of T, A, and C are A, T, and G respectively. Thus, the complementary string of the given string TAC is ATG.

Source: codechef | Difficulty: EASY


Solutions:
T = int(input())
for i in range(0, T):
	n = int(input())
	s = input()
	for i in range(0, n):
		if s[i] == 'A':
			print('T', end='')
		elif s[i] == 'T':
			print('A', end='')
		elif s[i] == 'G':
			print('C', end='')
		elif s[i] == 'C':
			print('G', end='')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	st = ''
	for i in range(n):
		if s[i] == 'A':
			st = st + 'T'
		elif s[i] == 'T':
			st = st + 'A'
		elif s[i] == 'C':
			st = st + 'G'
		elif s[i] == 'G':
			st = st + 'C'
	print(st)


t = int(input())
for i in range(0, t):
	n = int(input())
	s = input()
	k = ''
	for i in s:
		if i == 'A':
			k = k + 'T'
		elif i == 'T':
			k = k + 'A'
		elif i == 'C':
			k = k + 'G'
		elif i == 'G':
			k = k + 'C'
	print(k)


for _ in range(int(input())):
	n = int(input())
	s = input()
	res = ''
	for ele in s:
		if ele == 'A':
			res = res + 'T'
		elif ele == 'C':
			res = res + 'G'
		elif ele == 'T':
			res = res + 'A'
		else:
			res = res + 'C'
	print(res)


for i in range(int(input())):
	a = int(input())
	c = ''
	b = input()
	for k in b:
		if k == 'A':
			c += 'T'
		if k == 'T':
			c += 'A'
		if k == 'C':
			c += 'G'
		if k == 'G':
			c += 'C'
	print(c)


for i in range(int(input())):
	n = int(input())
	string = input()
	new_str = ''
	for i in range(n):
		if string[i] == 'A':
			new_str = new_str + 'T'
		elif string[i] == 'T':
			new_str = new_str + 'A'
		elif string[i] == 'C':
			new_str = new_str + 'G'
		elif string[i] == 'G':
			new_str = new_str + 'C'
	print(new_str)


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	ns = ''
	for i in s:
		s.upper()
		if i == 'A':
			ns = ns + 'T'
		elif i == 'T':
			ns = ns + 'A'
		elif i == 'C':
			ns = ns + 'G'
		elif i == 'G':
			ns = ns + 'C'
	print(ns)


def Comp(n: int, s: str) -> str:
	l = ''
	for i in s:
		if i == 'A':
			l = l + 'T'
		elif i == 'T':
			l = l + 'A'
		elif i == 'C':
			l = l + 'G'
		elif i == 'G':
			l = l + 'C'
	print(l)
for i in range(int(input())):
	n = int(input())
	s = input()[:n]
	Comp(n, s)


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	p = ''
	for i in range(n):
		if s[i] == 'A':
			p += 'T'
		elif s[i] == 'T':
			p += 'A'
		elif s[i] == 'C':
			p += 'G'
		elif s[i] == 'G':
			p += 'C'
	print(p)


for i in range(int(input())):
	n = int(input())
	s = input()
	new = ' '
	for i in range(n):
		if s[i] == 'A':
			new = new + 'T'
		elif s[i] == 'T':
			new = new + 'A'
		elif s[i] == 'C':
			new = new + 'G'
		elif s[i] == 'G':
			new = new + 'C'
	print(new)


for _ in range(int(input())):
	N = int(input())
	S = input()
	news = ''
	for i in S:
		if i == 'T':
			news += 'A'
		elif i == 'A':
			news += 'T'
		elif i == 'G':
			news += 'C'
		elif i == 'C':
			news += 'G'
	print(news)


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	str = ''
	for j in range(n):
		if s[j] == 'A':
			str += 'T'
		elif s[j] == 'T':
			str += 'A'
		elif s[j] == 'C':
			str += 'G'
		elif s[j] == 'G':
			str += 'C'
	print(str)


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	strn = ''
	for i in range(len(s)):
		if s[i] == 'A':
			strn += 'T'
		elif s[i] == 'T':
			strn += 'A'
		elif s[i] == 'C':
			strn += 'G'
		else:
			strn += 'C'
	print(strn)


T = int(input())
for i in range(T):
	N = int(input())
	S = input()
	Str = ''
	for j in range(N):
		if S[j] == 'A':
			Str += 'T'
		elif S[j] == 'T':
			Str += 'A'
		elif S[j] == 'C':
			Str += 'G'
		elif S[j] == 'G':
			Str += 'C'
	print(Str)


t = int(input())
for i in range(t):
	N = int(input())
	S = input()
	string = ''
	for i in range(N):
		if S[i] == 'A':
			string += 'T'
		elif S[i] == 'T':
			string += 'A'
		elif S[i] == 'C':
			string += 'G'
		elif S[i] == 'G':
			string += 'C'
	print(string)


strands = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
for _ in range(int(input())):
	n = int(input())
	s = input()
	result_str = ''
	for si in s:
		result_str += strands[si]
	print(result_str)


def re(s):
	base = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
	new = [base[b] for b in s]
	return ''.join(new)
n = int(input())
for i in range(n):
	n1 = int(input())
	m = input()
	l = len(m)
	print(re(m))


t = int(input())
for i in range(t):
	x = int(input())
	s = input()
	for i in range(x):
		if s[i] == 'A':
			print('T', end='')
		elif s[i] == 'T':
			print('A', end='')
		elif s[i] == 'G':
			print('C', end='')
		elif s[i] == 'C':
			print('G', end='')
	print('')


t = int(input())
for i in range(0, t):
	n = int(input())
	s = input()
	s = s.replace('A', 'm')
	s = s.replace('T', 'A')
	s = s.replace('m', 'T')
	s = s.replace('C', 'n')
	s = s.replace('G', 'C')
	s = s.replace('n', 'G')
	print(s)


t = int(input())
for i in range(t):
	N = int(input())
	S = input()
	NS = ''
	for i in range(len(S)):
		if S[i] == 'A':
			NS += 'T'
		elif S[i] == 'T':
			NS += 'A'
		elif S[i] == 'C':
			NS += 'G'
		elif S[i] == 'G':
			NS += 'C'
		else:
			pass
	print(NS)


for i in range(int(input())):
	s = int(input())
	str1 = ''
	str2 = input()
	for i in str2:
		if i == 'A':
			str1 = str1 + 'T'
		elif i == 'T':
			str1 = str1 + 'A'
		elif i == 'C':
			str1 = str1 + 'G'
		elif i == 'G':
			str1 = str1 + 'C'
	print(str1)


for i in range(int(input())):
	n = int(input())
	a = input()
	for i in a:
		if i == 'A':
			print('T', end='')
		elif i == 'T':
			print('A', end='')
		elif i == 'C':
			print('G', end='')
		else:
			print('C', end='')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	char = input()
	l = list(str(char))
	for j in range(len(l)):
		if l[j] == 'A':
			l[j] = 'T'
		elif l[j] == 'T':
			l[j] = 'A'
		elif l[j] == 'C':
			l[j] = 'G'
		elif l[j] == 'G':
			l[j] = 'C'
	l = ''.join(l)
	print(l)


t = int(input())
for i in range(t):
	n = int(input())
	S = input()
	for j in S:
		if j == 'A':
			print('T', end='')
		elif j == 'T':
			print('A', end='')
		elif j == 'C':
			print('G', end='')
		elif j == 'G':
			print('C', end='')
	print()


testcase = int(input())
while testcase > 0:
	n = int(input())
	s = input()
	lst = []
	for i in s:
		if i == 'A':
			lst.append('T')
		elif i == 'T':
			lst.append('A')
		elif i == 'C':
			lst.append('G')
		else:
			lst.append('C')
	for i in lst:
		print(i, end='')
	print()
	testcase -= 1


for _ in range(int(input())):
	a = int(input())
	s = input()
	l = []
	for i in s:
		if i == 'A':
			l.append('T')
		elif i == 'T':
			l.append('A')
		elif i == 'C':
			l.append('G')
		else:
			l.append('C')
	for i in l:
		print(i, end='')
	print()


for _ in range(int(input())):
	n = int(input())
	s = input()
	ne = ''
	for i in range(n):
		if s[i] == 'A':
			ne += 'T'
		elif s[i] == 'T':
			ne += 'A'
		elif s[i] == 'C':
			ne += 'G'
		elif s[i] == 'G':
			ne += 'C'
	print(ne)


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	s1 = ''
	for x in s:
		if x == 'A':
			s1 = s1 + 'T'
		elif x == 'T':
			s1 = s1 + 'A'
		elif x == 'C':
			s1 = s1 + 'G'
		else:
			s1 = s1 + 'C'
	print(s1)


for i in range(int(input())):
	x = int(input())
	y = input()
	y.upper()
	front = ''
	j = 0
	while j < x:
		if y[j] == 'A':
			front = front + 'T'
		elif y[j] == 'T':
			front = front + 'A'
		elif y[j] == 'C':
			front = front + 'G'
		elif y[j] == 'G':
			front = front + 'C'
		j = j + 1
	print(front)


t = int(input())
while t > 0:
	n = int(input())
	s = input()
	a = ''
	for i in range(n):
		if s[i] == 'A':
			a = a + 'T'
		elif s[i] == 'T':
			a += 'A'
		elif s[i] == 'C':
			a += 'G'
		else:
			a += 'C'
	print(a)
	t -= 1


def complement_strand(s):
	complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
	return ''.join((complement[n] for n in s))
t = int(input())
for _ in range(t):
	n = int(input())
	s = input().strip()
	print(complement_strand(s))


t = int(input())
adn = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
for _ in range(t):
	n = int(input())
	s = input()
	complementary = ''.join(map(lambda x: adn[x], s))
	print(complementary)


for m in range(int(input())):
	t = int(input())
	s = input()
	ans = ''
	for m in s:
		if m == 'A':
			ans += 'T'
		elif m == 'T':
			ans += 'A'
		elif m == 'C':
			ans += 'G'
		else:
			ans += 'C'
	print(ans)


t = int(input())
for _ in range(t):
	count = input()
	string = input()
	my_dict = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
	answer = ''
	for char in string:
		answer += my_dict[char]
	print(answer)


for _ in range(int(input())):
	n = int(input())
	s = list(input())[:n]
	ans = ''
	for i in s:
		if i == 'A':
			ans += 'T'
		elif i == 'T':
			ans += 'A'
		elif i == 'C':
			ans += 'G'
		else:
			ans += 'C'
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	string = input()
	newstring = ' '
	for i in range(n):
		if string[i] == 'A':
			newstring = newstring + 'T'
		elif string[i] == 'T':
			newstring = newstring + 'A'
		elif string[i] == 'C':
			newstring = newstring + 'G'
		elif string[i] == 'G':
			newstring = newstring + 'C'
	print(newstring)


n = int(input())
for i in range(n):
	t = int(input())
	a = input()
	d = ''
	for j in a:
		if j == 'A':
			d = d + 'T'
		elif j == 'T':
			d = d + 'A'
		elif j == 'C':
			d = d + 'G'
		else:
			d = d + 'C'
	print(d)


t = int(input())
for i in range(t):
	c = ''
	N = int(input())
	S = input()
	for j in S:
		if j == 'A':
			c += 'T'
		elif j == 'T':
			c += 'A'
		elif j == 'C':
			c += 'G'
		else:
			c += 'C'
	print(c)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(str(input()))
	d = dict()
	d['A'] = 'T'
	d['T'] = 'A'
	d['C'] = 'G'
	d['G'] = 'C'
	res = ''
	for el in a:
		res += d[el]
	print(res)


for _ in range(int(input())):
	n = int(input())
	l = list(input())
	for i in range(len(l)):
		if l[i] == 'A':
			l[i] = 'T'
		elif l[i] == 'T':
			l[i] = 'A'
		elif l[i] == 'C':
			l[i] = 'G'
		else:
			l[i] = 'C'
	print(''.join(l))


for i in range(int(input())):
	N = int(input())
	S = input()
	Z = ''
	for i in range(N):
		if S[i] == 'A':
			Z = Z + 'T'
		elif S[i] == 'T':
			Z = Z + 'A'
		elif S[i] == 'C':
			Z = Z + 'G'
		elif S[i] == 'G':
			Z = Z + 'C'
	print(Z)


for x in range(int(input())):
	n = int(input())
	s = input()
	ret = []
	d = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
	for y in s:
		t = d[y]
		ret.append(t)
	ans = ''.join(ret)
	print(ans)


def complement_strand(S):
	comp_S = ''
	for i in S:
		if i == 'A':
			comp_S += 'T'
		elif i == 'T':
			comp_S += 'A'
		elif i == 'C':
			comp_S += 'G'
		elif i == 'G':
			comp_S += 'C'
	return comp_S
T = int(input())
for _ in range(T):
	N = int(input())
	S = input().strip()
	comp_S = complement_strand(S)
	print(comp_S)


n = int(input())
for i in range(n):
	n1 = int(input())
	s = input()
	s1 = ''
	for j in s:
		if j == 'A':
			s1 = s1 + 'T'
		elif j == 'T':
			s1 = s1 + 'A'
		elif j == 'C':
			s1 = s1 + 'G'
		elif j == 'G':
			s1 = s1 + 'C'
	print(s1)


for _ in range(int(input())):
	y = int(input())
	x = input()
	s = ''
	for j in range(len(x)):
		if x[j] == 'T':
			s = s + 'A'
		elif x[j] == 'A':
			s = s + 'T'
		elif x[j] == 'C':
			s = s + 'G'
		else:
			s = s + 'C'
	print(s)


for _ in range(int(input())):
	n = int(input())
	a = input()
	res = ''
	for i in a:
		if i == 'A':
			res += 'T'
		elif i == 'T':
			res += 'A'
		elif i == 'C':
			res += 'G'
		else:
			res += 'C'
	print(res)