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



Sample input:
A


Sample output:
T

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
str=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
b = input()

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

print(chars[b])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
base = input()

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
base = ['A','T','C','G']
 
ind = base.index(input())
if(ind%2 == 0):
  print(base[ind+1])
else:
  print(base[ind-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inpt = input()

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

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
# N = int(input())
# N = list(map(int, input().split()))
# N = input().split()
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
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:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
b = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

# 引用　python する man,「Pythonでの再帰関数とメモ化」, PSM, ２０１７、７/４
# http://muromura.hatenablog.com/entry/2017/07/04/204908#%E3%83%A1%E3%83%A2%E5%8C%96
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]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

print(d[s])

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
print('ATCG'['TAGC'.index(input())])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc122/tasks/abc122_a

import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
S = str(input())
target_map = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(target_map[S[0]])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
c = input()

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

print(p[c])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
# python template for atcoder1
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
import sys

a = input()

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

print(x[a])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

print(A[b])

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = raw_input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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)  # type: str
    solve(b)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = str(input())

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
b = input()
A = ['A', 'C', 'G', 'T']
B = ['T', 'G', 'C', 'A']
for i in range(4):
    if b == A[i]:
        print(B[i])

Submission status: Accepted

Solution code:
# coding: utf-8
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'

Submission status: Accepted

Solution code:
b = input()

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    b = input()

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


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
if s=='A':
 print("T");
elif s=='C':
 print("G");
elif s=='G':
 print("C");
elif s=='T':
 print("A");

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
b = input()

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b=input()

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

print(ans)

Submission status: Accepted

Solution code:
b = input()

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

print(out)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
if N == "A":
    print("T")
if N == "T":
    print("A")
if N == "C":
    print("G")
if N == "G":
    print("C")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
base = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()
#b = list(string.split(','))
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)

Submission status: Accepted

Solution code:
s = input().strip()
if s == "A":
  print("T")
elif s == "T":
  print("A")
elif s == "C":
  print("G")
else:
  print("C")

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
#encoding: utf-8

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

Solution code:
input = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pair = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'}

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

Submission status: Accepted

Solution code:
map = {
    "A":"T",
    "T":"A",
    "C":"G",
    "G":"C"
}

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_line = sys.stdin.readline()

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

print(enki_map[input_line.strip()])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input() 

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cs = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'}

b = input()

print(cs[b])

Submission status: Accepted

Solution code:
s = input()
at, cg = ['A', 'T'], ['C', 'G']
if s in at:
    print(at[s == 'A'])
if s in cg:
    print(cg[s == 'C'])

Submission status: Accepted

Solution code:
s = input()
dic_ = {'T':'A','A':'T','G':'C','C':'G'}
print(dic_[s])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dic = {
    'A': 'T',
    'T': 'A',
    'C': 'G',
    'G': 'C'
}

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

# A-T, C-G

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

Submission status: Accepted

Solution code:
base = input()

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

Submission status: Accepted

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