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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,q = map(int, input().split())
s = input()
lr = [list(map(int,input().split())) for i in range(q)]
for i in range(q):
  print(len(s[lr[i][0]-1:lr[i][1]].replace('AC',':').split(':'))-1)

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

Solution code:
b = input()

bases = ('A', 'C', 'G', 'T')

for idx, base in enumerate(bases):
  if base == b:
    print(bases[int(~bin(idx))])
    break

Submission status: Runtime Error

Solution code:
b = input()

bases = ['A', 'C', 'G', 'T']

for idx, base in enumerate(bases):
  if base == b:
    print(bases[int(~bin(idx))])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
b = input()

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

print(c[b])

Submission status: Runtime Error

Solution code:
import re
n,q = map(int,input().split())
s = input()
ac = s.count('AC')
for a in range(q):
    lm = list(map(int,input().split()))
    str1 = s[lm[0]-1:lm[1]:]
    if len(str1) > n:
        str2 = s[0:lm[0]-1:] + s[lm[1]::]
        print(s - str2.count('AC'))
    else:
        print(str1.count('AC'))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin

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

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

Submission status: Runtime Error

Solution code:
S = str(input())

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

Submission status: Runtime Error

Solution code:
b = int(input())

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

print(dict[b])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,q=map(int,input().split())
s=list(input())
value=[0]*n
ans_list=[]
length=[]
     
for i in range(len(s)-1):
  value[i+1]=value[i]+(1 if s[i]=='A' and s[i+1]=='C' else 0)
  
for i in range(q):
  l,r=map(int,input().split())
  print(value[r-1]-value[l-1])

Submission status: Runtime Error

Solution code:
n,q=map(int,input().split())
s=input()

for _ in range(q):
	l,r=map(int,input().split())
	# list_=[s[l-1:r]]
	# print(s[l-1:r])
	ans=0
	for i in range(l-1,r-1):
		if s[i] == 'A' and s[i+1] == 'C':
			ans +=1



	print(ans)

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
s = input()


for i in range(q):
    l,r = map(int, input().split())
    Counter = s[l-1:r]
    count = Counter.count('AC')
    print(count)

Submission status: Runtime Error

Solution code:
b=input()

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

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
data = input()
result = [0] * N
for i in range(N-1):
  if data[i] == "A" and data[i+1]:
    result[i+1] = result[i] + 1
  else:
    result[i+1] = result[i

for i in range(Q):
  l, r = map(int, input().split())
  print(result[r-1]-result[l-1])

Submission status: Runtime Error

Solution code:
File Edit Options Buffers Tools Python Help                                                                                                                                              
# -*- coding: utf-8 -*-                                                                                                                                                                  

import sys

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

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

Solution code:
from itertools import accumulate


N, Q = list(map(int, input().split()))
S = input()
A = [list(map(int, input().split())) for i in range(Q)]

flg = []
for i in range(N-1):
    tmp_S = S[i:i+2]
    if tmp_S == 'AC':
        flg.append(1)
    else:
        flg.append(0)

flg2 = [0] + flg
flg2 = list(accumulate(flg2))

for a in A:
    print(flg2[a[1]-1] - flg2[a[0]-1])

Submission status: Runtime Error

Solution code:
from itertools import accumulate
n, q = list(map(int, input().split()))
s = input()
a = [list(map(int, input().split())) for i in range(q)]

flg = []

for i in range(n-1):
    tmp = s[i:i+2]
    if tmp == 'AC':
        flg.append(1)
    else:
        flg.append(0)
    
flg2 = [0] + flg
flg2 = list(accumulate(flg2))

for l in a:
    print(flg2[l[1]-1] - flg2[l[0]-1])

Submission status: Runtime Error

Solution code:
x = input().split()

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

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

Solution code:
b = int(input())

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

Submission status: Runtime Error

Solution code:
from collections import deque
N, Q = map(int, input().split())
S = input()
l = [0 for i in range(Q)]
r = [0 for i in range(Q)]

for i in range(Q):
    l[i], r[i] = map(int, input().split())

for i in range(Q):
    s = S[l[i]-1:r[i]]
    print(s.count('AC'))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

int main()
{
	char b;
	cin >> b;
	if(b == 'A')
		cout << "T";
	else if(b == 'T')
		cout << "A";
	else if(b == 'C')
		cout << "G";
	else if(b == 'G')
		cout << "C";
	return 0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

int main()
{
	char b;
	cin >> b;
	if(b == "A")
		cout << "T";
	else if(b == "T")
		cout << "A";
	else if(b == "C")
		cout << "G";
	else if(b == "G")
		cout << "C";
	return 0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

int main()
{
	string b;
	cin >> b;
	if(b == "A")
		cout << "T";
	else if(b == "T")
		cout << "A";
	else if(b == "C")
		cout << "G";
	else if(b == "G")
		cout << "C";
	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# C - GeT AC
# https://atcoder.jp/contests/abc122/tasks/abc122_c
import sys
n, q = list(map(int, sys.stdin.readline().split()))

s = input()

separators = [list(map(int, sys.stdin.readline().split())) for _ in range(q)]

# n = 8
# q = 3
# s = 'ACACTACG'
# separators = [[3, 7],[2, 3],[1, 8]]

cnt = []

for index in range(0, len(separators)):
    cnt.append(s[separators[index][0]-1:separators[index][1]].count('AC'))

for i in cnt:
    print(i)

Submission status: Runtime Error

Solution code:
l = ['A', 'C', 'T', 'G']
b = input()
for i in range(3):
    if l[i] == b:
        print(l[(i+2)/4])
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
BASE_PAIRS = [['A', 'T'], ['C', 'G']]
base_b = input()
paired_base_index = ValueError
result = ''

for i in range(len(BASE_PAIRS)):
    paired_base_index = BASE_PAIRS[i].index(base_b)
    if paired_base_index != ValueError:
        result = BASE_PAIRS[i][(paired_base_index+1) % 2]
        break

print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
using namespace std;

int main(){
    string s;
    cin >> s;
    if(s=="A"){
        cout << "T";
    }else if(s=="T"){
        cout << "A";
    }else if(s=="C"){
        cout << "G";
    }else {
        cout << "C";
    }

    getchar();
    return  0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(["ACGT"]["CATG".find(input())])

Submission status: Runtime Error

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

print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
s = input()
data = []
for i in range(q):data.append(list(map(int, input().split())))
for i in data:print(len(s[i[0]-1:i[1]].split('AC'))-1)

Submission status: Runtime Error

Solution code:
a = int(input()) 

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

Submission status: Runtime Error

Solution code:
def main():
  b=int(input())

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

main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,q = map(int,input().split())
s = input()
for i in range(q):
  l,r = map(int,input().split())
  j = l-1
  AC = 0
  while j < r-1:
    if s[j] == "A" and s[j+1] == "C":
      AC += 1
      j += 1
    j += 1
  print(AC)

Submission status: Runtime Error

Solution code:
a = input()
s = (("A", "T"), ("C", "G"))
d = dict(s)+ dict(i[::-1] for i in s)

print(d[a])

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
import functools
import math

values = [290021904, 927964716, 826824516, 817140688]
gcd = functools.reduce(math.gcd, values)
print(gcd)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

def main():
    input = sys.stdin.readline
    b = str(input())
    
    #対応辞書
    dic = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
    
    #変換
    print(dic[b])
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

def main():
    input = sys.stdin.readline
    b = input()
    
    #対応辞書
    dic = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
    
    #変換
    print(dic[b])
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N , Q  = map(int,input().split())
S =input()
l = []
r = []
counts = []
for i in range(Q):
    a,b = map(int,input().split())
    l.append(a)
    r.append(b)
    counts.append(0)

for i in range(Q):
    s = ""
    for j in range(l[i], r[i]):
        s += S[j]
        if S[j - 1] + S[j] == "AC":
            counts[i] += 1

for i in counts:
    print(i)

Submission status: Runtime Error

Solution code:
import sys

def main():
    input = sys.stdin.readline
    b = input()
    
    #対応辞書
    dic = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
    
    #変換
    print(dic[b])
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

def main():
    input = sys.stdin.readline
    S = input()
    
    #対応辞書
    dic = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
    
    #変換
    print(dic[S])
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

elif b =="T":
    print("A")

elif b =="C":
    print("G")

elif b == "G":
    pritn("C")

Submission status: Runtime Error

Solution code:
b = input()

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

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

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

else:
    print('C')

Submission status: Runtime Error

Solution code:
N,Q=map(int,input().split())
S=input()

lis = [0] * len(S)
for i in range(len(S)):

  if i>0:
    lis[i] += lis[i-1]
  if i < len(S)-1 and S[i] == 'A' and S[i+1] == 'C':
    lis[i+1] += 1


for _ in range(Q):
  L = tuple(map(int, input().split()))

  c = 0
  print(lis[L[1]-1]-lis[L[0]-1])

Submission status: Runtime Error

Solution code:
b=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#累積和による解法

N,Q = map(int, input().split())
S = input()
cnt_list = []

for i in range(N+1):
    S_part = S[:i]
    cnt = S_part.count("AC")
    cnt_list.append(cnt)
for j in range(Q):
    l,r = map(int, input().split())
    ans = cnt_list[r]-cnt_list[l-1]
    if S[l-1:l+1]=="CA":
        ans -= 1
    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,Q=map(int,input().split()) 
S=str(input())
t = [0] * (N + 1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, q = map(int, inp().split())
s = inp()
a = []

for i in range(n - 1):
    if s[i:i+2] == 'AC':
        a.append(1)
    else:
        a.append(0)

for _ in range(q):
    l, r = map(int, inp().split())
    print(sum(a[l-1:r-1]))

Submission status: Runtime Error

Solution code:
import pdb
import builtins
import sys
import numpy as np
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 map(int,input().split())
            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

u = CustomUtils()

n, q = u.to_int(input())
s = input()

import re

ss = []
m = re.finditer('AC', s)
for match in m:
    st, en= match.span()
    ss.append(st)
ss.sort()
ss = np.array(ss)

# そこまでに含まれるACの数を返す。
@memorize
def accumulative(i):
    if i == -1:
        return 0
    elif i -1 in ss:
        return accumulative(i-1)+1
    else:
        return accumulative(i-1)
    
total = len(ss)

for _ in range(q):
    # n文字目とindexがずれた。
    l, r = [int(x)  - 1 for x in input().split()]
    result = accumulative(r) - accumulative(l)
    # ちょうどindexlまでに含まれるACの数が、境界をまたぐ数。
    print("{}".format(result))

Submission status: Runtime Error

Solution code:
# ABC122A - Double Helix
# a-t, c-g
data = {'a': 't', 't': 'a', 'c': 'g', 'g': 'c'}

print(data[input()])

Submission status: Runtime Error

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

u = CustomUtils()

n, q = u.to_int(input())
s = input()

import re
# カウントに関わる要素が同時に起こることはない（独立でもある。）
# この問題のみに特化したアルゴを書く
# そこまでに含まれているACの数とそこまでに崩されているACの数を数える。


ss = []
# 文字列をreで
# 先に処理, 同じことをなんどもやらんですむように
m = re.finditer('AC', s)
for match in m:
    st, en= match.span()
    ss.append(st)
ss.sort()
ss = np.array(ss)

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    NQ = input().split(" ")
    N ,Q = int(NQ[0]),int(NQ[1])

    S = input()
    stack =[]
    for x in range(Q):
        lr = input()
        lr = lr.split(" ")
        l ,r = int(lr[0]),int(lr[1])
        target = S[l-1:r]
        num = target.split("AC")
        stack.append(num)
    for x in [len(y)-1 for y in stack]:
        print(x)

Submission status: Runtime Error

Solution code:
# coding: utf-8

s = input()

a1 = ['A','T']
a2 = ['C','G']

print(s)
if s in a1:
    l = a1
else:
    l = a2

l.discard(s)

print(l[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
S = input()
L = len(S)
target = 'AC'
shiftID = len(target) - 1

found_id = []

for i in range(L-shiftID):
    if S[i:i+len(target)] == target:
        found_id.append(i)


for _ in range(Q):
    l, r = map(int, input().split())
    l -= 1
    r -= 1

    ans = 0
    for i in found_id:

        if l <= i and i+shiftID <= r:
            ans += 1
        elif r < i + shiftID:
            break

    print(ans)

Submission status: Runtime Error

Solution code:
z =input()

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

Submission status: Runtime Error

Solution code:
n, q = list(map(int, input().split()))
str = input()

ac = [0] * (n-1)
for i in range(0, n-1):
    if str[i:i+1+1] == "AC":
        ac[i] = 1

val = [0] * q

for i in range(0, q):
    l, r = [int(x) for x in input().split(" ")]
    val[i] = sum(ac[l-1:r-1])

for v in val:
    print(v)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, q = list(map(int, input().split()))
s = input()
for i in range(q):
    l, r = list(map(int, input().split()))
    print(len(s[l - 1:r].split("AC")) - 1)

Submission status: Runtime Error

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: Runtime Error

Solution code:
def trans(g):
    gene = ['A', 'G', 'T', 'U']
    return gene[(gene.index(g)+2)%4]

b = input()
ans = ''

for i in b:
    ans += trans(i)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,q = map(int, input().split())
str = input()
for i in range(q):
  l,r = map(int, input().split())
  sub_str = str[(l-1):r]
  count = 0
  for j in range(len(sub_str)):
    if (sub_str[j:j+2] == 'AC'):
      count += 1
  print(count)

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
s = str(input())
lists = list(list(map(int, input().split())) for i in range(q))
AC_index = []
counter = 0

for i in range(n-1):
    if s[i] + s[i+1] == 'AC':
        AC_index.append(i)

for i in range(q):
    l, r = (lists[i][0]-1), (lists[i][1]-1)
    for j in AC_index:
        if l <= j <= r-1:
            counter += 1
    print(counter)
    counter = 0

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

Solution code:
b = input()

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

Submission status: Runtime Error

Solution code:
b=input()

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
ref=imput()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x=input()
dic={'A':'T',
      'C':'G',
      'G':'C',
      'T':,'A',
     }

print(dic[x])

Submission status: Runtime Error

Solution code:
n, q = list(map(int, input().split()))
s = input()
for i in range(q):
  l,r = list(map(int, input().split()))
  print(s[(l - 1):r].count('AC'))

Submission status: Runtime Error

Solution code:
dgthd

Submission status: Runtime Error

Solution code:
t

Submission status: Runtime Error

Solution code:
d

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
import sys

import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(" ")]


n = readInt()
M = 10 ** 9 + 7


dp = np.zeros((n + 1, 256), dtype=np.uint32)
dp[0, 255] = 1


for i in range(n):
    for j4 in [0, 64, 128, 192]:
        for j3 in [0, 16, 32, 48]:
            j43 = j4 + j3
            for j2 in [0, 4, 8, 12]:
                j432 = j43 + j2
                for j1 in range(4):
                    j = j432 + j1
                    l321 = 4 * (j3 + j2 + j1)
                    for l0 in range(4):
                        if (6 == (j3 + 4 * j1 + l0)) or (6 == (j3 + j2 + l0)) or (6 == (4 * j2 + 4 * j1 + l0)) or (6 == (16 * j1 + j2 + l0)) or (6 == (4 * j2 + 4 * l0 + j1)):
                            continue
                        l = l321  + l0
                        dp[i + 1, l] = (dp[i + 1, l] + dp[i, j]) % M

ret = 0
for v in dp[-1]:
    ret = (ret + v) % M
print(ret)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
d = input()

if d == "A":
    print("T")
    
else if d == "T":
    print("A")

else if d == "C":
    print("G")
    
else:
    print("C")

Submission status: Runtime Error

Solution code:
d = input()

if d == "A":
    print("T")
    
else if d == "T":
    print("A")

    
else if d == "C":
    print("G")
    
else:
    print("C")

Submission status: Runtime Error

Solution code:
l = (("A","T"),("G","C"))
i = inpit()
if i in l[0]:
  if i == l[0][0]:
    print(l[0][1])
  else: print(l[0][0])
else:
  if i == l[1][0]:
    print(l[1][1])
  else: print(l[1][0])

Submission status: Runtime Error

Solution code:
b = input()

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

print(OUT)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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