On the Planet AtCoder, there are four types of bases: A, C, G and T. A bonds with T, and C bonds with G.
You are given a letter b as input, which is A, C, G or T. Write a program that prints the letter representing the base that bonds with the base b.

-----Constraints-----
 - b is one of the letters A, C, G and T.

-----Input-----
Input is given from Standard Input in the following format:
b

-----Output-----
Print the letter representing the base that bonds with the base b.

-----Sample Input-----
A

-----Sample Output-----
T


Difficulty: introductory

Starter code:

Solutions:
d = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print((d[input()]))


b = input()

if b == 'A':
    print('T')

elif b == 'T':
    print('A')

elif b == 'C':
    print('G')

elif b == 'G':
    print('C')

b = input()
b = b.replace('A', 'a')
b = b.replace('T', 'b')
b = b.replace('C', 'c')
b = b.replace('G', 'd')
b = b.replace('a', 'T')
b = b.replace('b', 'A')
b = b.replace('c', 'G')
b = b.replace('d', 'C')

print(b)

def f(c):
  if c == "A":
    return "T"
  elif c == "T":
    return "A"
  elif c == "C":
    return "G"
  else:
    return "C"

print(f(input()))

# A and T , C and G

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")
    
# 大文字で入力ならこれでよいけど、小文字だったらどうするのかなあ


b =  input ()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
elif b == "C":
    print("G")
else:
    print("error")

s=input()
if s=="A":
    print("T")
elif s=="T":
    print("A")
elif s=="G":
    print("C")
elif s=="C":
    print("G")

b = input()
if b == "A":
  b = "T"
elif b == "T":
  b = "A"
elif b == "C":
  b = "G"
elif b == "G":
  b = "C"
print(b)

c = input()

d = 'AGTC'

for i in range(0,4):
	if d[i] == c:
		print(d[(i+2)%4])

b=input()

if b=='A' :
    print('T')
elif b=='G':
    print('C')
elif b=='T':
    print('A')
elif b=='C':
    print('G')

b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
else:
    print('G')


n=str(input())
if n=='A':
    print('T')
elif n=='T':
    print('A')
elif n=='G':
    print('C')
else:
    print('G')

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A") 
elif b == "C":
    print("G") 
else:
    print("C")      

print("ATCG"["TAGC".index(input())])

b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
else:
    print('G')

moji = str(input())
correct = ["A","C","G","T"]
ind = correct.index(moji) + 1
print(correct[ind*-1])

a = ['A','C','G','T']
b = ['T','G','C','A']
asn = ''
s = str(input())
for i in range(4):
    if s == a[i]:
        print((b[i]))


s = input()

if s == "A":
  print("T")
elif s == "T":
  print("A")
elif s == "C":
  print("G")
else:
  print("C")

n=input()
c=["A","T","G","C"]
a=["T","A","C","G"]
for i in range(4):
    if n==c[i]:
        print(a[i])
        break

b = input()
if b == "A":
    print("T")
elif b == "C":
    print("G")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
else:
    print("error")

b = input()
if b == "A":
    print("T")
elif b == "C" :
    print("G")
elif b == "G":
    print("C")
elif b == "T":
    print("A")


b = input()
dh = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}

print(dh[b])

b = input()

L = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(L[b])

b=input()
if b=="A":
  print("T")
elif b=="T":
  print("A")
elif b=="C":
  print("G")
else:
  print("C")

table = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
print(table[input().rstrip()])

b = input ()

if b == "A":
    print ("T")

elif b == "C":
    print ("G")

elif b == "T":
    print ("A")

elif b == "G":
    print ("C")

print({"A":"T","T":"A","C":"G","G":"C"}[input()])

M = {'A':'T', 'T': 'A', 'C':'G', 'G':'C'}
print(M[input()])

b=input()
if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("G")
else:
    print("C")

d = {"A":"T", "T":"A", "G":"C", "C":"G"}
print((d[input()]))


s1 = 'ACGT'
s2 = 'TGCA'

b = input()

for i in range(4):
    if(s1[i]==b):
        print(s2[i])
        break

b = input()

s0 = ['A', 'T', 'C', 'G']
s1 = ['T', 'A', 'G', 'C']

for i, s in enumerate(s0):
    if s == b:
        print((s1[i]))
        break


x = input()

if x == 'A':
    print('T')
elif x == 'C':
    print('G')
elif x == 'G':
    print('C')
else:
    print('A')

b = input()

print('A') if b == 'T' else print('T') if b == 'A' else print('C') if b == 'G' else print('G')

b = input()
dic = {
    'A':'T',
    'T':'A',
    'C':'G',
    'G':'C'
}
 
print((dic[b]))


# 入力
b = input()

# 処理&出力
if b == 'A':
    print('T')
elif b == 'T':
    print('A')

if b == 'C':
    print('G')
elif b == 'G':
    print('C')

b=input()

if b=="A":
    ans="T"

elif b=="T":
    ans="A"
    
elif b=="C":
    ans="G"
    
else:
    ans="C"
    
print(ans)

# ABC122
# A Double Helix
# AT CG
b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
else:
    print("C")


l = ['A','C','G','T']
print(l[3-l.index(input())])

b = input()
if b == 'A':
   print('T')
elif b == 'T':
   print('A')
elif b == 'C':
   print('G')
else:
   print('C')

# A - Double Helix

b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
elif b == 'C':
    print('G')

b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
else:
    print('C')


b = input()

if b == 'A':
    ans = 'T'
elif b == 'C':
    ans = 'G'
elif b == 'G':
    ans = 'C'
elif b == 'T':
    ans = 'A'

print(ans)

b = str(input())

basis = ['A', 'C', 'G', 'T']
label = basis.index(b)
print(basis[3-label])

b = input()
if(b == 'A' or b == 'T'):
    if(b == 'A'):
        print("T")
    else:
        print("A")
else:
    if(b == 'C'):
        print('G')
    else:
        print('C')


b = input()
if b =="A":
    print("T")
elif b =="T":
    print("A")
elif b =="C":
    print("G")
elif b =="G":
    print("C")

b = input()

if b == 'A':
    print("T")

elif b == 'T':
    print("A")

elif b == 'C':
    print("G")

elif b == 'G':
    print("C")


b = input()

if b =='A':
    print('T')

elif b == 'T':
    print('A')

elif b == 'C':
    print('G')

elif b == 'G':
    print('C')


print(input().replace("A","a").replace("T","A").replace("a","T").replace("G","g").replace("C","G").replace("g","C"))

b = input()
a = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
print(a[b])

b=input()
if b=="A":
  print("T")
elif b=="T":
  print("A")
elif b=="C":
  print("G")
else:
  print("C")

S = input()
if S=='G':
  print('C')
elif S=='C':
  print('G')
elif S=='A':
  print('T')
else:
  print('A')

b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
elif b == "G":
  print("C")

a = input()
if a == 'A':
  print('T')
elif a == 'T':
  print('A')
elif a == 'C':
  print('G')
else:
  print('C')


b=input()
print("A" if b=="T" else "T" if b=="A" else "G" if b=="C" else "C")

b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
elif b == 'C':
    print('G')

d = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
print((d[input()]))



b = input()

if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')

a = input()
print("A" if a =="T" else "T" if a =="A" else "G" if a =="C" else "C")

# 4種類の塩基 A,C,G,T が存在し、 A と T 、 C と G がそれぞれ対
# A,C,T,G いずれかの文字 b が入力される
# 塩基 b と対になる塩基をあらわす文字を出力

b = input()

if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')

p = {'A':'T', 'T':'A', 'G':'C', 'C':'G'}
print(p[input()])

b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')

s = input()
if s == 'A':
    print('T')
elif s == 'T':
    print('A')
elif s == 'C':
    print('G')
elif s == 'G':
    print('C')


char = input()

answer = ''
if char == 'A':
    answer = 'T'
elif char == 'C':
    answer = 'G'
elif char == 'G':
    answer = 'C'
else:
    answer = 'A'

print(answer)

c = input()

if c == 'A':
	print('T')
elif c == 'T':
	print('A')
elif c == 'C':
	print('G')
else:
	print('C')

b=input()

if b=="A":
	print("T")
elif b=="T":
	print("A")
elif b=="C":
	print("G")
else:
	print("C")

b = str(input())

if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
else:
  print('C')

#N, K=map(int,input().split())
b = str(input())

def main():
    if b == "A":
        print("T")
    elif b == "T":
        print("A")
    elif b == "C":
        print("G")
    elif b == "G":
        print("C")

def __starting_point():
    main()
__starting_point()

b = input()

if b == "A":
    print("T")
if b == "T":
    print("A")
if b == "C":
    print("G")
if b == "G":
    print("C")

b=input()
if b=='A':
  print('T')
if b=='T':
  print('A')
if b=='C':
  print('G')
if b=='G':
  print('C')

def main():
    b = input()
    if   b == "A": print("T")
    elif b == "T": print("A")
    elif b == "C": print("G")
    else:          print("C")

main()

s = input()

if s == 'A':
    print('T')
elif s == 'T':
    print('A')
elif s == 'G':
    print('C')
elif s == 'C':
    print('G')

b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')

elif b == ('G'):
    print('C')


b = input()
if b == "A":
    print("T")
elif b == "C":
    print("G")
elif b == "G":
    print("C")
else:
    print("A")


b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
else:
    print('C')

b=input()
if b=="A":
    print("T")
if b=="T":
    print("A")
if b=="C":
    print("G")
if b=="G":
    print("C")


b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')


a = input()
if a == "A":
  print("T")
elif a == "T":
  print("A")
elif a == "G":
  print("C")
else:
  print("G")

# author:  Taichicchi
# created: 09.09.2020 23:20:32

import sys

b = input()

d = {
    "A" : "T",
    "T" : "A",
    "G" : "C",
    "C" : "G",
}

print(d[b])

b = input()

if b == "A":
    print("T")
if b == "C":
    print("G")
if b == "T":
    print("A")
if b == "G":
    print("C")


# A,Double Helix
# AtCoder 星には四種類の塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対になります。
# 文字 bが入力されます。これは A, C, G, T のいずれかです。塩基bと対になる塩基を表す文字を出力するプログラムを書いてください。

# bは文字 A, C, G, T のいずれかである。

b = input()

# 塩基bと対になる塩基を表す文字を出力せよ。

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")

b = input()
if b == "A":
    print("T")
if b == "T":
    print("A")
if b == "C":
    print("G")
if b == "G":
    print("C")



print('TCG A'[ord(input())%5])

b = input()
if b == 'A': print('T')
elif b == 'T': print('A')
elif b == 'C': print('G')
else: print('C')

DNA_b = input()

if DNA_b == 'A':
    print('T')
elif DNA_b == 'T':
    print('A')
elif DNA_b == "C":
    print('G')
elif DNA_b == "G":
    print('C')

a = input()
if a == "A":
    print("T")
if a == "T":
    print("A")
if a == "G":
    print("C")
if a == "C":
    print("G")

b = str(input())

if b == 'A':
    print('T')
if b == 'T':
    print('A')

if b == 'C':
    print('G')
if b == 'G':
    print('C')

b = input()
if  b == "A" :
    print("T")
elif b == "T" :
    print("A")
elif b == "G" :
    print("C")
elif b == "C" :
    print("G")

AT = ['A', 'T']
CG = ['C', 'G']
b = input()

if b in AT:
    AT.remove(b)
    print((*AT))
else:
    CG.remove(b)
    print((*CG))


b = input()

if b == 'A' or b == 'T':
    print('AT'.replace(b,''))
else:
    print('CG'.replace(b,''))

b = input()

if b == "A":
    print("T")

elif b == "T":
    print("A")

elif b == "C":
    print("G")

elif b == "G":
    print("C")

b = input()

dict = {
    'A':'T',
    'T':'A',
    'C':'G',
    'G':'C'
}

print(dict[b])

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
else:
    print("G")

#122A

#1.入力をちゃんと受け取ること
b=input()
#2.結果を出力する
if b=='A' :
    print('T')
elif b=='G':
    print('C')
elif b=='T':
    print('A')
elif b=='C':
    print('G')

s = input()

if s == 'A':
  print('T')
elif s == 'T':
  print('A')
elif s == 'C':
  print('G')
else:
  print('C')

a = input()

if a=="A":
    print("T")

elif a == "C":
    print("G")

elif a =="G":
    print("C")

else:
    print("A")

d = dict()
d["A"] = "T"
d["T"] = "A"
d["C"] = "G"
d["G"] = "C"
S = input()
print(d[S])

b = input()
if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("G")
else:
    print("C") 

a=input()
if a=='A':print('T')
elif a=='T':print('A')
elif a=='C':print('G')
else:print('C')

b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
else:
    print('G')