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

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=input()
A="AT"
B="CG"
if b in A:
    ans=A.replace(b,"")
else:
    ans=B.replace(b,"")
print(ans)

Submission status: Accepted

Solution code:
b = input()
l = ["A", "C", "G", "T"]
if b == l[0]:
    print(l[3])
elif b == l[1]:
    print(l[2])
elif b == l[2]:
    print(l[1])
elif b == l[3]:
    print(l[0])

Submission status: Accepted

Solution code:
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:
b = str(input())

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "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:
b = list(input())
ans = [None]*len(b)
def en(n):
    if n == "A":
        return "T"
    elif n == "T":
        return "A"
    elif n == "G":
        return "C"
    else:
        return "G"
for i in range(len(b)):
    ans[i] = en(b[i])
print(*ans)

Submission status: Accepted

Solution code:
s = input()
verse = "ACGT"
inverse = "TGCA"
id = verse.index(s)
print(inverse[id])

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
b=input()
print(b.translate(str.maketrans({'A':'T','T':'A','C':'G','G':'C'})))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S=input()

a=["A","T","C","G"]
b=["T","A","G","C"]

print(b[a.index(S)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Double Helix
a={'A':'T','T':'A','C':'G','G':'C'}

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

Submission status: Accepted

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

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

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

print(mapping[b])

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

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:
clb=['A','T','G','C']
K=input()
if clb[0]==K or clb[2]==K:
    print(clb[clb.index(K)+1])
else:
    print(clb[clb.index(K)-1])

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:
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:
#!/usr/bin/env python3
import sys


def solve(b: str):
    S = '#ACGT'
    return S[-S.find(b)]


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    print(solve(b))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
stdin = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(input())
l=[]
for i in range(len(s)):
  if s[i]=='A':
    l.append('T')
  if s[i]=='T':
    l.append('A')
  if s[i]=='G':
    l.append('C')
  if s[i]=='C':
    l.append('G')
print(''.join(l))

Submission status: Accepted

Solution code:
b = input()
at = ['A', 'T']
cg = ['C', 'G']
if b in at:
    at.remove(b)
    print(at[0])
else:
    cg.remove(b)
    print(cg[0])

Submission status: Accepted

Solution code:
b = input()

big = ["A","T","G","C"]
cou = ["T","A","C","G"]

ans = cou[big.index(b)]
print(ans)

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:
d = {
  'A': 'T',
  'T': 'A',
  'C': 'G',
  'G': 'C'
}

print(d[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:
b=input()
dic={i:j for i,j in zip('ATCG','TAGC')}
print(dic[b])

Submission status: Accepted

Solution code:
# Code for A - Double Helix
# Use input() to fetch data from STDIN
# A, C, G, T が存在し、A と T、C と G
h = input()
d = {"A": "T", "T": "A", "C": "G", "G": "C"}
print(d[h])

Submission status: Accepted

Solution code:
b = input()
d = dict(zip("ACTG", "TGAC"))
print(d[b])

Submission status: Accepted

Solution code:
def main():
    b = input()
    d = {'A': 'T',
         'T': 'A',
         'C': 'G',
         'G': 'C',
         }

    print(d[b])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
s = input()
at = {"A", "T"}
cg = {"C", "G"}

if s in at:
    print((at - set(s)).pop())
if s in cg:
    print((cg - set(s)).pop())

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(S[N])

Submission status: Accepted

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

b = input().strip()

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

Submission status: Accepted

Solution code:
#122_A
enki={'A':'T','T':'A','C':'G','G':'C'}
print(enki[input()])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

print(a_dict[b])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC-122-A
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 = str(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:
s = input()
d = {}
d["A"] = "T"
d["T"] = "A"
d["G"] = "C"
d["C"] = "G"
print(d[s])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
enki={'A':'T','T':'A','G':'C','C':'G'}
s=input()
print(enki[s])

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

Submission status: Accepted

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

Submission status: Accepted

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

print(dict[b])

Submission status: Accepted

Solution code:
s=input()
ans1='AT'
ans2='GC'
if s in ans1:
    print(ans1.strip(s))
else:
    print(ans2.strip(s))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc122/tasks/abc122_a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
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:
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=str(input())
if b=='A':
    print('T')
elif b=='T':
    print('A')
elif b=='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()
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:
l1 = ['A', 'C', 'G', 'T']
l2 = ['T', 'G', 'C', 'A']
b = input()
print(l2[l1.index(b)])

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()
chk = 'ACGT'
if b == 'A':
  print(chk[3])
elif b == 'C':
  print(chk[2])
elif b == 'G':
  print(chk[1])
else:
  print(chk[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

b = ns()
m = dict()
m["A"] = "T"
m["T"] = "A"
m["G"] = "C"
m["C"] = "G"
print(m[b])

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

Submission status: Accepted

Solution code:
b = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
a="ACGT"
j=0
for i in range(4):
  if a[i]==N:
  	j=i  
print(a[3-j])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    B = input()
    D = {'A': 'T',
         'C': 'G',
         'G': 'C',
         'T': 'A'}
    print(D[B])


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
b = input()

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

print(a[b])

Submission status: Accepted

Solution code:
b = input()
print(b.replace("A", "X").replace("T", "A").replace("X", "T").replace("C", "Y").replace("G", "C").replace("Y", "G"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()

sys.setrecursionlimit(10 ** 9)


def main():
    b = INPUT()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
b = input()

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

print("".join([enki[i] for i in b]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()
l = {"A":1,"C":2,"G":3,"T":4}

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

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

Submission status: Accepted

Solution code:
b = input()

def enki(st):
    if st == 'A':
        return 'T'
    if st == 'T':
        return 'A'
    if st == 'G':
        return 'C'
    if st == 'C':
        return 'G'
       
print(enki(b))

Submission status: Accepted

Solution code:
#122 a
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:
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:
b=str(input())
if b=='A':
  print('T')
elif b=='T':
  print('A')
elif b=='C':
  print('G')
else:
  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:
b = input()
if b in "AT":
    print("AT"[b == "A"])
else:
    print("CG"[b == "C"])

Submission status: Accepted

Solution code:
b=str(input())
x=['A','C','G','T']
y=['T','G','C','A']
print(x[y.index(b)])

Submission status: Accepted

Solution code:
b = input()

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

Submission status: Accepted

Solution code:
x=str(input())
if x=="A":
    print("T")
elif x=="T":
    print("A")
elif x=="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')
else:
    print('C')

Submission status: Accepted

Solution code:
b = input()
a = ["A", "T"]
c = ["C", "G"]
ans = ""

if b in a:
	a.remove(b)
	print("".join(a))
else:
	c.remove(b)
	print("".join(c))

Submission status: Accepted

Solution code:
b=str(input())
Enki=['A','C','G','T']
print(Enki[-Enki.index(b)-1])

Submission status: Accepted

Solution code:
b = input()
print( "AT".strip(b) if b == "A" or b == "T" else "CG".strip(b))

Submission status: Accepted

Solution code:
import sys
import math
import itertools

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:
s = ["T","G","C","A"]
c = ["A","C","G","T"]
b = str(input())
for i in range(len(s)):
  if(b == c[i]):
    print(s[i])

Submission status: Accepted

Solution code:
b = input()
l = [
    ('A', 'T'),
    ('T', 'A'),
    ('C', 'G'),
    ('G', 'C'),
]
for i, j in l:
    if i == b:
        print(j)

Submission status: Accepted

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

print(gene[input()])

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


def read_list():
    return list(read_values())


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(2):
    for j in range(2):
        if b==A[i][j]:
            print(A[i][(j+1)%2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())
star = ["A","C","G","T"]
num = 0
for i in range(4):
    if n == star[i]:
        print(star[~i])
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
base = ["A","C","G","T"]
b = input()
n =  int(base.index(b))
print(base[3-n])

Submission status: Accepted

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

ans = stars[(stars.index(b) + 2) % 4]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b=input()

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 15, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

d = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
b = readline().decode('utf8').split()
print(d[b[0]])

Submission status: Accepted

Solution code:
import sys

corresponding = dict(zip('ACGT', 'TGCA'))

b = sys.stdin.readline().rstrip()

def main():
    return corresponding[b]

if __name__ == '__main__':
    ans = main()
    print(ans)

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:
    pass

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(dicG[s])

Submission status: Accepted

Solution code:
b=input()

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

b = ns()

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

Submission status: Accepted

Solution code:
b = input().strip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = input()
print(
    b.replace("A", "X").replace("T", "A").replace("X", "T").replace(
        "C", "Y").replace("G", "C").replace("Y", "G"))

Submission status: Accepted

Solution code:
d = {'A':'T', 'T':'A', 'G':'C', 'C':'G'}
print(d[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:
b=input()
l=['A','C','G','T']
for i in range(4):
  if b==l[i]:
    print(l[3-i])

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

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

print(data[b])

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    dic={'A':'T','T':'A','G':'C','C':'G'}
    b=STR()
    print(dic[b])
if __name__ == '__main__':
    do()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

c = ""

for d in b:
    if d=="A":
        c = c + "T"
    elif d=="C":
        c = c + "G"
    elif d=="G":
        c = c + "C"
    else:
        c = c + "A"
    
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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