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):
b = str(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')
else:
  print('G')

Solution (Python):
base = input()

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

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

Solution (Python):
b = input()

if b.find('A') == 0:
    ac = b.replace('A','T')
elif b.find('T') == 0:
    ac = b.replace('T','A')
elif b.find('G') == 0:
    ac = b.replace('G','C')
elif b.find('C') == 0:
    ac = b.replace('C','G')

print(ac)

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']
 
ind = base.index(input())
if(ind%2 == 0):
  print(base[ind+1])
else:
  print(base[ind-1])

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

Solution (Python):
print(''.join(['AGCT'[3-'AGCT'.find(i)]for i in list(input())]))

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 == "T":
    print("A")
elif b == "G":
    print("C")
elif b == "C":
    print("G")

Solution (Python):
inpt = input()

if inpt == 'A':
  print('T')
elif inpt == 'T':
  print('A')
elif inpt == '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):



N = input()
ans = ''
if N == 'A':
    ans = 'T'
if N == 'T':
    ans = 'A'
if N == 'C':
    ans = 'G'
if N == 'G':
    ans = 'C'
    

print(ans)

Solution (Python):

from sys import stdin


s_in = lambda: stdin.readline()[:-1]  
d_in = lambda: int(stdin.readline())  
ds_in = lambda: list(map(int, stdin.readline().split()))  


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

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

Solution (Python):
b = input()
if b == "A":
    print("T")
elif b == "G":
    print("C")
elif b == "T":
    print("A")
elif b == "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":
    ans = "T"
elif b == "T":
    ans = "A"
elif b == "C":
    ans = "G"
else:
    ans = "C"
print(ans)

Solution (Python):
b = input()

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

print(b)

Solution (Python):
print("TAGC"["ATCG".find(input())])

Solution (Python):
i = input()
L1=["A","C","G","T"]
L2=["T","G","C","A"]
print(L2[L1.index(i)])

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

Solution (Python):
import sys


table = {'A':'T', 'T':'A', 'G': 'C', 'C':'G'}
ch = sys.stdin.readline()[0];
print(table[ch])

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):
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=='G':
    print('C')
elif b=='C':
    print('G')

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

Solution (Python):

"""
A - Double Helix
https://atcoder.jp/contests/abc122/tasks/abc122_a

"""
import sys


def main(args):
    b = input()
    pairs = {'A': 'T', 'T': 'A', 'C': 'G', 'G':'C'}
    print(pairs[b])


if __name__ == '__main__':
    main(sys.argv[1:])

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

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()
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")
else:
  print("G")

Solution (Python):
s = ['A','T','C','G']
print(s["TAGC".find(input())])

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()
dic = {"A":"T",
       "T":"A",
       "G":"C",
       "C":"G"}
print(dic[b])

Solution (Python):
input_char=input()
if input_char=='A':
  print('T')
elif input_char=='T':
  print('A')
elif input_char=='G':
  print('C')
elif input_char=='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":
    ans = "T"
elif b == "C":
    ans = "G"
elif b == "G":
    ans = "C"
else:
    ans = "A"

print(ans)

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

Solution (Python):
class Test:
    def __init__(self):
        pass

class CustomUtils:
    def __init__(self):
        pass
    def to_int(self, inputs, sp=' '):
        if sp == '':
            return [int(d) for d in list(inputs)]
        else:
            return [int(d) for d in inputs.split(sp)]
    def debug_print(self, inputs, debug=False):
        if debug:
            print(inputs)



def memorize(f):
    table = {}
    def func(*args):
        if not args in table:
            table[args] = f(*args)
        return table[args]
    return func
debug = False



iarray = ['A', 'C', 'G', 'T']
oarray = ['T', 'G', 'C', 'A']
idx = iarray.index(input())

print("{}".format(oarray[idx]))

Solution (Python):
b = input()
t = ["AT", "CG"]

for i in t:
    if b in i:
        print(i.replace(b, ""))

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

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()

def twin(base):
  if base == 'A':
    a = 'T'
  elif base == 'T':
    a = 'A'
  elif base == 'G':
    a = 'C'
  else:
    a = 'G'
  print(a)
  
twin(b)

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

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 == "C" ):
  print("G")
else:
  print("C")

Solution (Python):
s=input()

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

print(d[s])

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):
import sys
def input():
    return sys.stdin.readline()[:-1]
print('ATCG'['TAGC'.index(input())])

Solution (Python):
print('ATCG'['TAGC'.index(input())])

Solution (Python):
print('ATCG'['TAGC'.index(input())])

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

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=='G':
    print('C')
elif A=='T':
    print('A')
elif A=='C':
    print('G')

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

Solution (Python):


import sys
input = sys.stdin.readline

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

print(m[input().strip()])

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()
ans = ""
for i in range(len(s)):
    if s[i] == "A":
        ans += "T"
    elif s[i] == "T":
        ans += "A"
    elif s[i] == "G":
        ans += "C"
    elif s[i] == "C":
        ans += "G"
print(ans)

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

Solution (Python):
print({"A":"T", "T": "A", "C": "G", "G": "C"}[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 = str(input())
target_map = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(target_map[S[0]])

Solution (Python):
b = input()

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

Solution (Python):
c = input()

p = {}
p["A"] = "T"
p["G"] = "C"
p["T"] = "A"
p["C"] = "G"

print(p[c])

Solution (Python):
c = input()
if c == 'A':
  print('T')
elif c == 'T':
  print('A')
elif c == 'G':
  print('C')
elif c == '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):
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 == '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):
import numpy as np

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

if __name__ == '__main__':
   main()

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

s = input()[:-1]
if s == "A":
    print("T")
elif s == "T":
    print("A")
elif s == "C":
    print("G")
else:
    print("C")

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

Solution (Python):
import random

b = input()


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


def ans_2():
    Dic = {"A": "T", "T": "A", "C": "G", "G": "C"}
    print(Dic[b])


def ans_3():
    keys = ["A", "T", "C", "G"]
    values = keys[:]
    values[0], values[1] = values[1], values[0]
    values[2], values[3] = values[3], values[2]

    Dic = dict(zip(keys, values))
    print(Dic[b])


def get_key_from_value(d, val):
    keys = [k for k, v in d.items() if v == val]
    if keys:
        return keys[0]
    return None


def ans_4():
    Dic = {"A": "T", "C": "G"}
    if get_key_from_value(Dic, b):
        print(get_key_from_value(Dic, b))
    else:
        print(Dic[b])


method = random.randrange(4)
if method == 0:
    ans_1()
elif method == 1:
    ans_2()
elif method == 2:
    ans_3()
else:
    ans_4()

Solution (Python):
import sys

a = input()

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

print(x[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()

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

print(A[b])

Solution (Python):
import numpy as np

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()
c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print (c[b])

Solution (Python):
b = raw_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()
enki = ['A', 'C', 'G', 'T']
tui = ['T', 'G', 'C', 'A']

print(tui[enki.index(b)])

Solution (Python):

import sys


def solve(b: str):
    if b == 'A':
        ret = 'T'
    elif b == 'T':
        ret = 'A'
    elif b == 'C':
        ret = 'G'
    elif b == 'G':
        ret = 'C'
    print(ret)
    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):



def main():
    b = input()

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


if __name__ == '__main__':
    main()

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()

at = ['A', 'T']
gc = ['G', 'C']

if b in at:
    at.remove(b)
    print(at[0])
else:
    gc.remove(b)
    print(gc[0])

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

Solution (Python):
b = str(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()
d = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
print(d[b])

Solution (Python):

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

Solution (Python):

import re
import bisect
from datetime import datetime as dt
b = raw_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')

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

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

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

Solution (Python):
N = input()
if N == "A":
  print("T")
elif N == "T":
  print("A")
elif N == "C":
  print("G")
elif N == "G":
  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 == 'T'):
    print('A')
elif(b == 'C'):
    print('G')
elif(b == 'G'):
    print('C')

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

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):
s = input()
c = 0
if s == "A" or s == "T":
    c = 1
if c == 1:
    if s == "A":
        print("T")
    else:
        print("A")
else:
    if s == "C":
        print("G")
    else:
        print("C")

Solution (Python):
b=input()
print('A' if b=="T" else 'T' if b=="A" else 'G' if b=="C" else '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):
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):

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

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

Solution (Python):
b = list(input())
ans = []
for i in range(len(b)):
    if b[i] == "A":
        ans.append("T")
    elif b[i] == "T":
        ans.append("A")
    elif b[i] == "C":
        ans.append("G")
    else:
        ans.append("C")
for i in range(len(ans)):
    if i != len(ans)-1:
        print(ans[i],end="")
    else:
        print(ans[i])

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

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

Solution (Python):
b = input()

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

print(c)

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

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':
    out = 'T'
elif b == 'T':
    out = 'A'
elif b == 'C':
    out = 'G'
elif b == 'G':
    out = 'C'

print(out)

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 = str(input())

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

Solution (Python):
s = input()

if s == 'A' :
    print('T')
elif s == 'T' :
    print('A')
elif s == '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')
else:
  print('error')

Solution (Python):


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

b = input()
print(p[b])

Solution (Python):
b = input()
X = {'A', 'T'}
Y = {'G', 'C'}
print(''.join(X - {b}) if b in X else ''.join(Y - {b}))

Solution (Python):
def print_atcg(data):
    if data == 'A':
        print('T')
    elif data == 'T':
        print('A')
    elif data == 'C':
        print('G')
    elif data == 'G':
        print('C')
    else:
        print('not found')


if __name__ == "__main__":
    data = input()
    print_atcg(data)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    s = S()
    t = [c for c in 'ATCG']

    return t[t.index(s) ^ 1]


print(main())

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

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

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

Solution (Python):
base = input()

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

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

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

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):
N = input()
if N == "A":
    print("T")
if N == "T":
    print("A")
if N == "C":
    print("G")
if N == "G":
    print("C")

Solution (Python):
b = input()
ans = ""

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')
if(a =='T'):
  print('A')
if(a =='C'):
  print('G')
if(a =='G'):
  print('C')

Solution (Python):

a = input()

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

Solution (Python):
N = input()
if N in "AT":
  print("AT".replace(N,""))
else:
  print("CG".replace(N,""))

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

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

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

Solution (Python):
b = input()

l = ""
for i in range(len(b)):
    if b[i]=='A':
        l += 'T'
    elif b[i]=='T':
        l += 'A'
    elif b[i]=='C':
        l += 'G'
    else:
        l += 'C'

print(l)

Solution (Python):
s = input().strip()
if s == "A":
  print("T")
elif s == "T":
  print("A")
elif s == "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()

out = tuple(filter(lambda x: b in x, [("A", "T"), ("C", "G")]))[0]

print(out[0] if out[1] == b else out[1])

Solution (Python):
b = input()

tpl = tuple(filter(lambda x: b in x, [('A', 'T'), ('C', 'G')]))[0]
print(tpl[0] if tpl[1] == b else tpl[1])

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')
else:
  print('G')

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

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

print(at[at.index(b)+1]) if at.index(b)%2 == 0 else print(at[at.index(b)-1])

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

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

Solution (Python):
def helix(x):
	if x == 'A': return 'T'
	elif x == 'T': return 'A'
	elif x == 'C': return 'G'
	else: return 'C'

print helix(raw_input())

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

if input == 'A':
  print('T')
elif input == 'T':
  print('A')
elif input == 'C':
  print('G')
else:
  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):
b=input()
dic={'A':'T','T':'A','C':'G','G':'C'}
print(dic[b])

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

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')
if b == 'T':
    print('A')
if b == 'G':
    print('C')
if b == 'C':
    print('G')

Solution (Python):
map = {
    "A":"T",
    "T":"A",
    "C":"G",
    "G":"C"
}

a = str(input())
print(map[a])

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

b=input()

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

print(d[b])

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

Solution (Python):
import sys

input_line = sys.stdin.readline()

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

print(enki_map[input_line.strip()])

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

Solution (Python):
print("TGCA"["ACGT".find(input())])

Solution (Python):
dic = {
    "A" : "T",
    "G" : "C",
    "T" : "A",
    "C" : "G"
}

key = input()
print(dic[key])

Solution (Python):
b=input()
 
def f(b):
  if(b!="A" and b!="T" and b!="C" and b!="G"):
    print("error")
  elif(b=="A"):
  	return "T"
  elif(b=="T"):
  	return "A"
  elif(b=="C"):
  	return "G"
  elif(b=="G"):
  	return "C"
  
print(f(b))

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

Solution (Python):
str = input() 

if str == 'A':
    print("T")
elif str == 'G':
    print("C")
elif str == 'C':
    print("G")
elif str == 'T':
    print("A")
else:
    print("エラー")

Solution (Python):
input_line = input()

if 'A' in input_line:
	print('T')
elif 'C' in input_line:
	print('G')
elif 'G' in input_line:
	print('C')
elif 'T' in input_line:
	print('A')

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

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):
from sys import (stdin, stdout)

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

for line in stdin:
  stdout.write(CORR_TAB[line.strip()] + '\n')

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):
ds={"A": "T", "T": "A", "C": "G", "G": "C"}
print(ds[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):
cs = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'}

b = input()

print(cs[b])

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

Solution (Python):
s = input()
at, cg = ['A', 'T'], ['C', 'G']
if s in at:
    print(at[s == 'A'])
if s in cg:
    print(cg[s == '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):
s = input()
dic_ = {'T':'A','A':'T','G':'C','C':'G'}
print(dic_[s])

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

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

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

n=input()
print(dic[n])

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

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

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')

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):
b = input()
if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
else :
    print("C")

Solution (Python):
en = input()
ne =['A','G','T','C']
for i in range(4):
  if en==ne[i]:
    print(ne[(i+2)%4])

Solution (Python):



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

Solution (Python):
base = input()

if base == 'A':
  print('T')
elif base == 'T':
  print('A')
elif base == '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):
X = input()
dict = {"A":"T","T":"A","C":"G","G":"C"}
print(dict[X])

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")
elif b=="T":
  print("A")
elif b=="G":
  print("C")
elif b=="C":
  print("G")

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

Solution (Python):


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

b = input()

print(dict[b])

Solution (Python):
b = input()

ans = ""
for i in range(len(b)):
    if b[i] == "A":
        ans += "T"
    elif b[i] == "T":
        ans += "A"
    elif b[i] == "C":
        ans += "G"
    elif b[i] == "G":
        ans += "C"

print(ans)

Solution (Python):
li = ["A", "C","T","G"] * 2
b = input()
for i in range(4):
    if b == li[i]:
        print(li[i+2])

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

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

Solution (Python):
helix_in = input()

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

print(helix_dic.get(helix_in))

Solution (Python):
b = input()

if b =='A':
   result='T'

elif b =='C':
   result='G'

elif b =='G':
   result='C'

elif b =='T':
   result='A'

print(result)

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

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

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

Solution (Python):
b = input()


if b=="A":
    r = "T"
elif b=="T":
    r = "A"
elif b=="C":
    r = 'G'
else:
    r = 'C'

print(r)

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

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

Solution (Python):
b = input()

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

print(result)

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 sys


def solve(b: str):
    if b is 'A':
        print('T')
    elif b is 'T':
        print('A')
    elif b is 'C':
        print('G')
    else:
        print('C')

    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()