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
stdin = sys.stdin

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

s = ns()

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

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

Solution (Python):
print(*map((lambda x: "TGCA"["ACGT".index(x)]), input()), sep='')

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

Solution (Python):


b = input()
pair = {"A":"T", "C":"G", "G":"C", "T":"A"}

print(pair[b])

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

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

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

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

Solution (Python):


















import math
import numpy as np
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right

def s_inpl(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))

S = input()

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

Solution (Python):
from math import *





a=input()

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

Solution (Python):
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()

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

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

Solution (Python):
h = input()

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

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

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007



def A():
    n = input()
    if n == "A":
        print("T")
    elif n == "C":
        print("G")
    elif n == "G":
        print("C")
    else:
        print("A")
    return


def B():
    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):
b = input()



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

print(listB[listA.index(b)])

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

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

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 LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def main():
    b = SI()
    tmp = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}

    return tmp[b]


print(main())

Solution (Python):
n = input()

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

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

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

Solution (Python):

x =raw_input()

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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())

def pne(n):
    print(n,end='')

rem = pow(10,9)+7












a = ["A","C","T","G"]
n =input()
l = a.index(n)
print(a[(l+2)%4])

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

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


if __name__ == '__main__':
    main()

Solution (Python):
B = input()
if B == 'A':
    ans = 'T'
elif B == 'C':
    ans = 'G'
elif B == 'G':
    ans = 'C'
elif B == 'T':
    ans = 'A'
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):
print(input().translate(str.maketrans("ATGC","TACG")))

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

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

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

print(d[b])

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 pf(s): return print(s, flush=True)

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

Solution (Python):
import atexit
import io
import sys

buff = io.BytesIO()
sys.stdout = buff


@atexit.register
def write():
    sys.__stdout__.write(buff.getvalue())

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

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

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

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

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

s=input()

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

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

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

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

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

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

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

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

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


import itertools
import collections
import bisect

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

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

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

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):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

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

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

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

Solution (Python):
from collections import deque, defaultdict as ddic
from itertools import combinations, permutations, product
from heapq import heappush, heappop, heapify
import sys
stdout = sys.stdout
rr = lambda: input().strip()
rri = lambda: int(rr())
rrm = lambda: list(map(int, rr().split()))

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

T = 1 
for tc in range(1, T+1):
    S = rr()
    ans = solve(S)
    print(ans)

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

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