Problem:
 Score : 100 points    Problem Statement 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 1 A      Sample Output 1 T       Sample Input 2 G      Sample Output 2 C

Solution (Python):

import sys


def solve(b: str):
    dict = {"A":"T","C":"G","G":"C","T":"A"}
    print(dict[b])
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    b = next(tokens)  
    solve(b)

if __name__ == '__main__':
    main()

Solution (Python):

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

print(b)

Solution (Python):
n=input()
if(n=="A"):
  print("T")
if(n=="T"):
  print("A")
if(n=="G"):
  print("C")
if(n=="C"):
  print("G")

Solution (Python):


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

a = input()

print(base[a])

Solution (Python):
mapper = {"A" : "T", "T" : "A", "C" : "G", "G" : "C"}
b = input()
print(mapper[b])

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

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

Solution (Python):
st = str(input())
a = ''
if st == 'A':
    a = 'T'
if st == 'T':
    a = 'A'
if st == 'G':
    a = 'C'
if st == 'C':
    a = 'G'
print(a)

Solution (Python):
b = input()

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

Solution (Python):
b = input()

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

Solution (Python):
l = list('ACGT')
print(l[3 - l.index(input())])

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

Solution (Python):
b=input()

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

Solution (Python):
b = input()

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

Solution (Python):
b = input()
list_ = ["A","T","G","C"]
if list_.index(b) % 2 == 0:
 print(list_[list_.index(b) + 1])
else:
 print(list_[list_.index(b) - 1])

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

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

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

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

Solution (Python):
a = ["A", "C", "G", "T"]
b=input()
print(a[-1-a.index(b)])

Solution (Python):
b=input()

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

print(ans)

Solution (Python):
b = input()

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

Solution (Python):


a = input()

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

Solution (Python):
x = input()
if x == 'A':
  print('T')
elif x == 'T':
  print('A')
elif x == 'G':
  print('C')
elif x == 'C':
  print('G')

Solution (Python):


def main():
    b = input()
    print(pair(b))

def pair(x: str) -> str:
    if x == "A":
        return "T"
    elif x == "T":
        return "A"
    elif x == "G":
        return "C"
    elif x == "C":
        return "G"


if __name__ == "__main__":
    main()

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

Solution (Python):
genom=input()
if genom == "A":
    genom = "T"
elif genom == "T":
    genom = "A"
elif genom == "G":
    genom = "C"
else:
    genom = "G"
print(genom)

Solution (Python):
b = input()

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

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

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

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

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

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

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

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

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

Solution (Python):
b = input()


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

print(d[b])

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

Solution (Python):
b = input()

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

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

Solution (Python):
b = input()
dna = ['A', 'T', 'C', 'G']
idx = dna.index(b) + 1 if dna.index(b) % 2 == 0 else dna.index(b) - 1
print(dna[idx])

Solution (Python):
s = input()
dic = {"A":"T","T":"A","C":"G","G":"C"}
print(dic[s])

Solution (Python):
b = str(input())

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

Solution (Python):
b = input()
aa = {"A":"T", "T":"A", "G":"C", "C":"G"}
print(aa[b])

Solution (Python):
import sys

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

print(b_dict[input()])

Solution (Python):
import sys

b = sys.stdin.readline().strip()
r = {"A": "T", "T": "A", "C": "G", "G": "C"}[b]
print(r)

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

Solution (Python):
print("ATGC"["TACG".find(input())])

Solution (Python):
enki = input()
if enki == "A":
  print("T")
elif enki == "T":
  print("A")
elif enki == "C":
  print("G")
elif enki == "G":
  print("C")

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

Solution (Python):
i = input()
r = 'G'

if i == 'A':
    r = 'T'
elif i == 'T':
    r = 'A'
elif i == 'G':
    r = 'C'

print(r)

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

Solution (Python):
b = input()

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

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

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

Solution (Python):
a = input()
if a == 'A':
  print('T')
if a == 'T':
  print('A')
if a == 'G':
  print('C')
if a == 'C':
  print('G')

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

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

Solution (Python):
b = input()

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

Solution (Python):
a=input()

if a=="A" or "T":
    if a=="T":
        b="A"
    if a=="A":
        b="T"

if a=="C" or "G":
    if a=="C":
        b="G"
    if a=="G":
        b="C"

print(b)

Solution (Python):
b = input().strip()
if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
elif b == "C":
    print("G")

Solution (Python):
x = [["A","T"], ["C","G"]]
b = input()
for i in x:
    if b in i:
        res = i.pop(i.index(b))
        print(i[0])

Solution (Python):
b = input()

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

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

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

Solution (Python):
b = input()

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

Solution (Python):
map={'A':'T','C':'G','G':'C','T':'A'}
inp=input()
print(map[inp])

Solution (Python):
import sys

s = sys.stdin.readline()
if 'A' in s:
    print('T')
elif 'G' in s:
    print('C')
elif 'C' in s:
    print('G')
else:
    print('A')

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

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

Solution (Python):
A=["A","T","G","C"]
s=input()
for i in range (0,3):
  if s==A[i]:
    break
  else:
    i += 1

if i%2==0:
  print(A[i+1])
else:
  print(A[i-1])

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

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

Solution (Python):
b = input()

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

print(ans)

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

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

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

Solution (Python):
b = input()

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

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

Solution (Python):
b = input()
enki = ['A','T','G','C']

if b == enki[0]:
  print('T')
elif b == enki[1]:
  print('A')
elif b == enki[2]:
  print('C')
else:
  print('G')

Solution (Python):
b = input()
enki = {
    "A": "T",
    "T": "A",
    "C": "G",
    "G": "C",
}
print(enki[b])

Solution (Python):
b = input()
dict_helix = {
    "A" : "T",
    "T" : "A",
    "C" : "G",
    "G" : "C"
}
print(dict_helix[b])

Solution (Python):



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

if __name__ == "__main__":
    main()

Solution (Python):
S = input()
if S == "A" :
    ans = "T"
elif S == "T" :
    ans = "A"
elif S == "C" :
    ans = "G"
else :
    ans = "C"
print(ans)

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

Solution (Python):
base_dict = {"A": "T", "T": "A", "G": "C", "C": "G"}
b = input()
print(base_dict[b])

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

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

Solution (Python):
n = input()
if n == "A":
    print("T")
elif n == "C":
    print("G")
elif n == "G":
    print("C")
else:
    print("A")

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

Solution (Python):
b = input()
ans = ''
for c in b:
    if c == 'A':
        ans += 'T'
    elif c == 'T':
        ans += 'A'
    elif c == 'G':
        ans += 'C'
    else:
        ans += 'G'
print(ans)

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

Solution (Python):

"""
Created on Fri Apr  5 13:45:00 2019

@author: adachi-lab
"""

input_code = input()

list_1 = []

if input_code == 'A' or input_code == 'T':
    list_1 = ['A','T']
    list_1.remove(str(input_code))
    print(list_1[0])
    
else:
    list_1 = ['C','G']
    list_1.remove(str(input_code))
    print(list_1[0])

Solution (Python):
a = input()
b = {"A" : "T", "G" : "C", "T" : "A", "C" : "G"}

print(b[a])

Solution (Python):
S=input()
E={"A":"T","T":"A","C":"G","G":"C"}
print(E[S])

Solution (Python):
S=input()

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

Solution (Python):
s=input();print(['C' if s=='G' else'G','T' if s=='A' else'A'][s in'AT'])

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

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

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

Solution (Python):
pair = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
print(pair.get(input()))

Solution (Python):
b=input()
a=['A','C','G','T']
c=['T','G','C','A']
i=a.index(b)
print(c[i])

Solution (Python):
B = input()
a = 'ATCG'
b = 'TAGC'
dic = {i:j for i,j in  zip(a,b)}

print(dic[B])

Solution (Python):

x = str(input())

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

Solution (Python):
b = input()

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

Solution (Python):
base = input()
if base == "A":
	print("T")
if base == "T":
	print("A")
if base == "C":
	print("G")
if base == "G":
	print("C")

Solution (Python):
def main():
    b = input()
    helix = {'A':'T', 'C':'G', 'T':'A', 'G':'C'}
    print(helix[b])
main()

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

Solution (Python):
b=input()

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

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

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

Solution (Python):
b=input()
if b in ["A","T"]:
	if b == "A":
		print("T")
	else:
		print("A")
else:
	if b=="G":
		print("C")
	else:
		print("G")

Solution (Python):
b = input()
if b in 'AT':
  print('AT'.replace(b,""))
else:
    print('GC'.replace(b,""))

Solution (Python):
b = str(input())

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

Solution (Python):
a = str(input())
dict = {'A': 'T','C':'G','T': 'A','G':'C'}

print(dict[a])

Solution (Python):
acid = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
c = input()
print(acid[c])

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

Solution (Python):
b=['A','T','A','C','G','C']
print(b[b.index(input())+1])

Solution (Python):
base = ['A', 'T', 'A', 'C', 'G', 'C']
str = input()
print(base[base.index(str) + 1])

Solution (Python):
base = {"A": "T", "T": "A", "C": "G", "G": "C"}
print(base[str(input())])

Solution (Python):
print({'A':'T','T':'A','G':'C','C':'G'}[input()])

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

Solution (Python):
s = input()
p = s.replace('A','B')
q = p.replace('T','A')
r = q.replace('B','T')
w = r.replace('G','W')
x = w.replace('C','G')
y = x.replace('W','C')
print(y)

Solution (Python):

a = str(input())
b = ["A","T"]
c = ["C","G"]

if a in b:
    b.remove(a)
    print(b[0])
else:
    c.remove(a)
    print(c[0])

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

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

Solution (Python):
s = input()

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

Solution (Python):
a = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}

print(a[input()])

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

Solution (Python):
b = input()

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

Solution (Python):
input = raw_input()
 
base = {"A":"T", "T":"A", "C":"G", "G":"C"}
 
print base[input]

Solution (Python):
b = input()

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    S = input()
    T = "ACGT"

    print(T[3-T.index(S)])


main()

Solution (Python):
b = input()

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

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

Solution (Python):
a=input()
dic={"A":"T","C":"G","T":"A","G":"C"}
print(dic[a])

Solution (Python):
S = input()
for i in S:
    if(i == 'A'):
        print('T',end="")
    elif (i == 'T'):
        print('A',end="")
    elif (i == 'G'):
        print('C',end="")
    else:
        print('G',end="")
print("")

Solution (Python):
b = input()
if b is 'A':
    print('T')
elif b is 'T':
    print('A')
elif b is 'C':
    print('G')
elif b is 'G':
    print('C')
else:
    print('Error')

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

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

Solution (Python):
b = input()

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

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

Solution (Python):


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

print(base[input()])

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

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

Solution (Python):
b = input()

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

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

else:
    print('G')

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

Solution (Python):
def main():
    b = input()
    if(b=='A'):
        return print('T')
    if(b=='T'):
        return print('A')
    if(b=='C'):
        return print('G')
    if(b=='G'):
        return print('C')
main()

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

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

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

Solution (Python):
B = input()

print(dict(zip("ATCG", "TAGC"))[B])

Solution (Python):
dic = {"A":"T", "T":"A", "C":"G", "G":"C"}
a = str(input())
print(str(dic[a]))

Solution (Python):
s=input()
if s=='A': print('T')
elif s=='T': print('A')
elif s=="C": print("G")
else: print("C")

Solution (Python):
ACGT = {'A':'T', 'C':'G', 'T':'A', 'G':'C'}
input_ACGT = input()
print(ACGT[input_ACGT])

Solution (Python):


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

if __name__ == "__main__":
    main()

Solution (Python):
s = input()
pair = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
ans = ""
for si in s:
  ans += pair[si]
  
print(ans)

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

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

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

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

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

Solution (Python):
b = input()
L = [["A","T"],["C","G"]]
for i in range(2):
    if b in L[i]:
        if L[i][0] == b:
            print(L[i][1])
        else:
            print(L[i][0])

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

Solution (Python):

"""
Created on Mon Apr  1 22:23:40 2019

@author: Owner
"""
a = []
b = str(input())

for item in b:
    if item == "A":
        item_mod = item.replace("A","T")
    if item == "G":
        item_mod = item.replace("G","C")
    if item == "T":
        item_mod = item.replace("T","A")
    if item == "C":
        item_mod = item.replace("C","G")
    a.append(item_mod)
print(a[0])

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

Solution (Python):
def main():
	b = input()
	rev = {"A":"T", "T":"A", "C":"G", "G":"C"}
	print(rev[b])

if __name__ == '__main__':
    main()

Solution (Python):
b = input()

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

Solution (Python):
B = input()
if B == 'A':
    print('T')
elif B == 'T':
    print('A')
elif B == 'C':
    print('G')
elif B == 'G':
    print('C')

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

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

if __name__ == '__main__':
  main()

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

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

Solution (Python):
b = input()

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

Solution (Python):

import copy
import numpy as np
import random


b = str(input())

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

print(dna[b])

Solution (Python):
tar = input()
if tar == 'A':
  print('T')
elif tar == 'T':
  print('A')
elif tar == 'G':
  print('C')
elif tar == 'C':
  print('G')

Solution (Python):
base = str(input())

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

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

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

Solution (Python):
b = input()

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

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

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

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

Solution (Python):
b = str(raw_input())                                                                                                
if b == 'A':
    print 'T' 
elif b == 'T':
    print 'A' 
elif b == 'C':
    print 'G' 
elif b == 'G':
    print 'C'

Solution (Python):
x=input()
if x=="G":
    print("C")
elif x=="C":
    print("G")
elif x=="A":
    print("T")
elif x=="T":
    print("A")
else:
    print("ありません。")

Solution (Python):
x=input()
if x=="G":
    print("C")
elif x=="C":
    print("G")
elif x=="A":
    print("T")
elif x=="T":
    print("A")
else:
    print("ありません。")

Solution (Python):
def double_helix(b):
    if b == 'A':
        return 'T'

    if b == 'T':
        return 'A'

    if b == 'C':
        return 'G'

    if b == 'G':
        return 'C'


if __name__ == "__main__":
    b = input()
    print(double_helix(b))

Solution (Python):
argv = input().split()[0]

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

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

if argv == "G":
    print("C")

if argv == "C":
    print("G")

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

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

Solution (Python):
b = input()

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

print(ans)

Solution (Python):


b = input()

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

Solution (Python):
b = input()

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

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

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

Solution (Python):
def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int, ss_raw()))

b = input()

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

def ans():
    return dna[b]

print(ans())

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

main()

Solution (Python):
str=input()

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

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

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

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

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

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

Solution (Python):
e_list = ['A', 'C', 'G', 'T']
b = str(input())
if b == e_list[0]:
    print(e_list[3])
elif b == e_list[1]:
    print(e_list[2])
elif b == e_list[2]:
    print(e_list[1])
elif b == e_list[3]:
    print(e_list[0])

Solution (Python):
b = input()

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

print(chars[b])

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