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):
def readln():
    return list(map(int, input().split()))


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

Solution (Python):
from sys import stdin
import math
import itertools


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix += [int(b) for b in a]
    return intMatrix


def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix


def makeInt(line):
    return int(line.rstrip())


def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve(input_string):
    N = input_string
    if N == 'A':
        return 'T'
    elif N == 'T':
        return 'A'
    elif N == 'G':
        return 'C'
    elif N == 'C':
        return 'G'


def main():
    input_lines = stdin.readline().rstrip()
    answer = solve(input_lines)
    print(answer)


if __name__ == '__main__':
    main()

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):
blist = ["A", "C", "G", "T"]
alist = ["T", "G", "C", "A"]

b = input()
print(alist[blist.index(b)])

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

Solution (Python):

 
def solve(b):
    if(b=='A'):
        print('T')
    elif(b=='T'):
        print('A')
    elif(b=='C'):
        print('G')
    else:
        print('C')
    
 
 
def main():
    b = input()
    solve(b)
 
 
if __name__ == '__main__':
    main()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    b = S()
    b = b[0]
    if b == "A":
        print("T")
    elif b == "T":
        print("A")
    elif b == "C":
        print("G")
    elif b == "G":
        print("C")
    return


def B():
    s = S()
    print(s.count("A")+s.count("G")+s.count("C")+s.count("T"))
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

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

Solution (Python):
b = input()
ans = ""
for i in b:
    if i == 'A':
        ans = ans + 'T'
        continue
    if i == 'C':
        ans = ans + 'G'
        continue
    if i == 'G':
        ans = ans + 'C'
        continue
    if i == 'T':
        ans = ans + 'A'
        continue
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):
i = input()
if i == "A":
    print("T")
elif i == "C":
    print("G")
elif i == "G":
    print("C")
elif i == "T":
    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):
from sys import stdin

blist = ["A", "C", "G", "T"]

b = stdin.readline().rstrip()

index = blist.index(b)

if index == 0:
    print("T")
elif index == 1:
    print("G")
elif index == 2:
    print("C")
else:
    print("A")

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

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

print(X)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  


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):
s = input()
ans = ''
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':
    b = b.replace('A', 'T')
elif b == 'T':
    b = b.replace('T', 'A')
elif b == 'C':
    b = b.replace('C', 'G')
else:
    b = b.replace('G', 'C')

print(b)

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

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

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):
b = input()
a1 = ['A', 'T']
a2 = ['C', 'G']
if b in a1: ans = a1
else: ans = a2
print(ans[1] if b==ans[0] else ans[0])

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

Solution (Python):
b = input()
strMap = {"A":"T","C":"G","G":"C","T":"A"}
print(strMap[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):
def main():
    b = input()

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


if __name__ == '__main__':
    main()

Solution (Python):
b = input()

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

Solution (Python):


import math
import sys
import itertools
import numpy as np

b = input()

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

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

Solution (Python):
a=list(input())
kekka=[]
for i in range(len(a)):
    if a[i]=="A":
        kekka.append("T")
    elif a[i]=="T":
        kekka.append("A")
    elif a[i]=="C":
        kekka.append("G")
    elif a[i]=="G":
        kekka.append("C")

print(kekka[0])

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

Solution (Python):
b=raw_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")
else:
  print("C")

Solution (Python):

b = input()

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

print(output)

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    S = input_raw[0]
    ans = ""
    for i in range(len(S)):
        if S[i] == "A":
            ans += "T"
        if S[i] == "T":
            ans += "A"
        if S[i] == "C":
            ans += "G"
        if S[i] == "G":
            ans += "C"
    print ans



if __name__ == '__main__':
    main()

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():
    to = ['T', 'G']
    fr = ['A', 'C']

    inc = input()

    try:
        print(to[fr.index(inc)])
    except Exception:
        print(fr[to.index(inc)])


if __name__ == "__main__":
    main()

Solution (Python):



if __name__ == '__main__':
    pair = {
        'A': 'T',
        'C': 'G',
        'G': 'C',
        'T': 'A'}

    b = input()

    ans = pair[b]
    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=str(input())
if b=="A":
    print("T")
elif b=="T":
    print("A")
elif b=="C":
    print("G")
elif b=="G":
    print("C")

Solution (Python):

"""
Created on Sun Mar 24 21:01:13 2019

@author: Wataru
"""

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

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

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

Solution (Python):

dic = {
    'A': 'T',
    'T': 'A',
    'G': 'C',
    'C': 'G',
}
s = input()
print(dic.get(s))

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

def inputList():
	a=list(map(int,input().split()))
	return a

def multisort(li,index):
	return sorted(li,key=lambda x: x[index])

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

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

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

Solution (Python):



s = input()
d=dict(A='T', C='G', T='A', G='C')
print(d[s])

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

Solution (Python):
b = input()
L = ['A', 'C', 'G', 'T']
idx = L.index(b)
print(L[3-idx])

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')
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):
I=input()

if I == "A":
  print("T")
elif I == "T":
  print("A")
elif I == "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):
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG =  True
def ddprint(x):
  if DBG:
    print(x)

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

main()

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

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

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

print(h_dict[b])

Solution (Python):
b = input()
out = ""
for i in range(len(b)):
    if b[i] == "A":
        out += "T"
    elif b[i] == "T":
        out += "A"
    elif b[i] == "C":
        out += "G"
    elif b[i] == "G":
        out += "C"
print(out)

Solution (Python):

data = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}
print(data[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=="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()
if a=="A":
    print("T")
elif a=="T":
    print("A")
elif a=="C":
    print("G")
elif a=="G":
    print("C")

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

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

Solution (Python):
import numpy as np

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

a = input()

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

if x =="A":
    print("T")
if x =="T":
    print("A")
if x =="C":
    print("G")
if x =="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):
def main():
    x = input()
    print({ "A": "T", "T": "A", "C": "G", "G": "C" }[x])

if __name__ == '__main__':
    main()

Solution (Python):
in_ = input()

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

Solution (Python):


n = raw_input()
translator = {"A": "T", "T": "A", "G": "C", "C": "G"}
print(translator[n])

Solution (Python):
txt=input()
ans=''
for t in txt:
	if(t=='A'):
		ans+='T'
	elif(t=='G'):
		ans+='C'
	elif(t=='C'):
		ans+='G'
	elif(t=='T'):
		ans+='A'

print(ans)

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

print(ans)

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

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

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

print(solve())

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

Solution (Python):
d = {'A': 'T', 'C':'G', 'G':'C', 'T':'A'}
print(d[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):
a = "ACTG"
c = input()
print(a[(a.find(c) + 2) % 4])

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()
dic = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'}
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):
dicts_ = {"A": "T", "T": "A", "C": "G", "G": "C"}

string = input()

print(dicts_[string])

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

Solution (Python):



import sys


def solve(c):
  if c == 'A':
    return 'T'
  elif c == 'T':
    return 'A'
  elif c == 'G':
    return 'C'
  elif c == 'C':
    return 'G'

c = str(input())[0]
print(solve(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):
s=input()

if s == "A":
    print("T")
if s == "T":
    print("A")
if s == "G":
    print("C")
if s == "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):
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 = dict({'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'})

print(d[b])

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

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

Solution (Python):
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

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

Solution (Python):
b = input()
pairs = {
    "A": "T",
    "T": "A",
    "C": "G",
    "G": "C"}
print(pairs[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()
print(b.translate(str.maketrans({'A': 'T', 'T': 'A','G': 'C', 'C': 'G'})))

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

print(result)

Solution (Python):
from sys import stdin
b = input()

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

Solution (Python):
s=input()

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

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



def main():
  b = input()
  if b == 'A':
    print('T')
  if b == 'T':
    print('A')

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

if __name__=='__main__':
  main()

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

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

Solution (Python):
b = input()

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

Solution (Python):

import sys
import collections

def main():
	b = input()
	ans = "a"
	if b == 'A':
		ans = "T"
	if b == "T":
		ans = "A"
	if b == "C":
		ans = "G"
	if b == "G":
		ans = "C"
	
	
	print(ans)
			
if __name__ == "__main__":
	main()

Solution (Python):

"""
Created on Sun Mar 24 20:49:38 2019

@author: Yamazaki Kenichi
"""

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

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

Solution (Python):
base = input()
a = ['A', 'T']
b = ['G', 'C']
if base in a:
  print([a[0], a[1]][base == 'A'])
else:
  print([b[0], b[1]][base == 'G'])

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

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

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

Solution (Python):
chars = input()

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

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

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

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

x = input()
print(pairs[x])

Solution (Python):
num = input()

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

Solution (Python):
b=list(input())
ans=''
for i in b:
    if i=='A':
        ans+='T'
    elif i=='T':
        ans+='A'
    elif i=='C':
        ans+='G'
    elif i=='G':
        ans+='C'

print(ans)

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

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

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

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

Solution (Python):
s = input().strip()
print({'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}[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):
enki=input()

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

print(ans)

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

Solution (Python):
n = input()

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

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

Solution (Python):
n=input()






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

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

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

import sys


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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
print {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}[raw_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()

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

print(ans)

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

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