Harryxun/stf_run huggingface dataset:
from collections import defaultdict
from math import gcd

n = int(input())
L = []
for i in range(n):
    l = list(map(int, input().split()))
    L.append(l)

Mod = 10 ** 9 + 7

Pow2 = [1]
for i in range(n):
    Pow2.append(Pow2[-1]*2)

def kikaku(a, b):
    g = gcd(a, b)
    a //= g
    b //= g
    if a < 0:
        return - a, -b
    return a, b

Dpos = defaultdict(int)
Dneg = defaultdict(int)

c = 0
for l in L:
    a, b = kikaku(l[0], l[1])
    if a == b == 0:
        c += 1
    elif b > 0:
        Dpos[(b, -a)] += 1
        Dneg[(b, -a)] += 0
    else:
        Dpos[(a, b)] += 0
        Dneg[(a, b)] += 1

r = 1
for k, v in Dpos.items():
    j = Dneg[k]
    if v > 0 and j > 0:
        r = r * (Pow2[v] + Pow2[j] - 1) % Mod
    elif v == 0 and j == 0:
        pass
    else:
        r = r * 2 % Mod 
ans = (r + c - 1) % Mod
print(ans)

### FIXED CODE ###

from collections import defaultdict
from math import gcd

MOD=10**9+7

n=int(input())
L=[]
for i in range(n):
	l=list(map(int,input().split()))
	L.append(l)

def kikaku(a,b):
	g=gcd(a,b)
	a//=g
	b//=g
	if a<0:
		return -a,-b
	return a,b
#aもbも正の場合Dposでカウント。
Dpos=defaultdict(int)
#aが正bが負の場合Dnegでカウント。
Dneg=defaultdict(int)

zerozero=0
azero=0
bzero=0

for l in L:
	a=l[0]
	b=l[1]
	if a==b==0:
		zerozero+=1
		continue
	if a==0:
		azero+=1
		continue
	if b==0:
		bzero+=1
		continue
	a,b=kikaku(a,b)
	if b>0:
		Dpos[(a,b)]+=1
	else:
		Dneg[(a,-b)]+=1
		Dpos[(-b,a)]+=0

r=1
for k,v in Dpos.items():
	a,b=k
	j=Dneg[(b,a)]
	r*=pow(2,v,MOD)+pow(2,j,MOD)-1
	#print(a,b,v,j,r)
	r%=MOD

r*=pow(2,azero,MOD)+pow(2,bzero,MOD)-1
r%=MOD
r-=1
r%=MOD

ans=r+zerozero
ans%=MOD
print(ans)
#print(Dpos)
#print(Dneg)
a=int(input())
b=input()

count=0
for i in range(a-2):
  if b[i]='a'and b[i+1]='b' and b[i+2]='c':
    count+=1
print(count)

### FIXED CODE ###

n=int(input())
s=input()
count=0
for i in range(n-2):
  if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
    count+=1
print(count)
A,B=map(int,input().split())
print(max(A+B),(A-B),(A*B))


### FIXED CODE ###

A, B = map(int, input().split())
print(max(A+B, A-B, A*B))
N = input()
c = 0
for i in range(len(N)):
    s = N[i]
    i = int(s)
    if i <= 5:
        c += i
    else:
        c += 1 + (10 - i)
        if i > 0 and N[i-1] > '5':
            c -= 2
print (c)


### FIXED CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    N = [0] + list(map(int,SI()))
    ans = 0
    for i in range(len(N)-1,-1,-1):

        if N[i] < 6 and not(N[i] == 5 and (i > 0 and N[i-1] >= 5)):
            ans += N[i]
        else:
            ans += 10 - N[i]
            N[i-1] += 1
    print(ans)
if __name__ == '__main__':
    main()
x = int(input())

h = x // 3600
m = x % 3600 // 60
s = % 60

print(h,m,s,sep=':')

### FIXED CODE ###

x = int(input())

h = x // 3600
m = x % 3600 // 60
s = x % 60

print(h,m,s,sep=':')
def f(N,S):
    alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ret_s = ""
    for s in S:
        num = (alpha.index(str(s)) + int(N))
        if num <= 25:
            pass
        else:
            num = num-(num//26)*26
        ret_s += alpha[num]
    return print(ret_s)

a = input()
b = input()

### FIXED CODE ###

def f(S):
    d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
    return print(d[str(S)])
f(input())
#平均値に近づけるという考え方が間違い

N = int(input())
A = list(map(int, input().split()))

A = [A[i]-(i+1) for i in range(N)]

A.sort()

center1 = A[N//2]
center2 = A[(N+2)//2]

ans1 = 0
for i in range(N):
    ans1 +=abs(A[i]-center1)

ans2 = 0
for j in range(N):
    ans2 += abs(A[j]-center2)
    
print (min(ans1, ans2))

### FIXED CODE ###

#平均値に近づけるという考え方が間違い-->中央値に近づける

N = int(input())
A = list(map(int, input().split()))

A = [A[i]-(i+1) for i in range(N)]

A.sort()

center1 = A[N//2]
if N == 1:
    center2 = 10 ** 9
else:
    center2 = A[(N+2)//2]

ans1 = 0
for i in range(N):
    ans1 +=abs(A[i]-center1)
    
ans2 = 0
for j in range(N):
    ans2 += abs(A[j]-center2)
    
print (min(ans1, ans2))
import sys
N,K=map(int, input().split())
p=[]
for i in range (0,N):
  r=list(map(int, input().split() )) 
  p.append(r)
p.sort()
k=0
for i in range(0,N):
  k+=p[i][0]]
  if k>=K:
    print(p[i][1])
    sys.exit()
import sys
N,K=map(int, input().split())
p=[]
for i in range (0,N):
  r=list(map(int, input().split() )) 
  p.append(r)
p.sort()
k=0
for i in range(0,N):
  k+=p[i][1]
  if k>=K:
    print(p[i][0])
    sys.exit()

### FIXED CODE ###

import sys
N,K=map(int, input().split())
p=[]
for i in range (0,N):
  r=list(map(int, input().split() )) 
  p.append(r)
p.sort()
k=0
for i in range(0,N):
  k+=p[i][1]
  if k>=K:
    print(p[i][0])
    sys.exit()
import math

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

N, K = map(int, input().split())
mod_num = 10 ** 9 + 7
for i in range(1, K + 1):
  print(comb(N - K + 1, i) * comb(K - 1, i - 1) % mod_num)


### FIXED CODE ###

import math

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

N, K = map(int, input().split())
mod_num = 10 ** 9 + 7
for i in range(1, K + 1):
  if i > N - K + 1:
    print(0)
  else:
    print(comb(N - K + 1, i) * comb(K - 1, i - 1) % mod_num)
import math

n = int(input())
s = input()

r_count = s.count('R')
g_count = s.count('G')
b_count = s.count('B')

answer = r_count*g_count*b_count


for k in range(1, min(n, math.ceil(n/3)+6)):
    for i in range(k):
        extracted = s[i::k]
        if len(extracted) >= 3:
            for l in range(len(extracted)-2):
                temp = extracted[l:l+3]
                if temp.count('R') == 1 and temp.count('G')==1 and temp.count('B'):
                    answer -= 1

print(answer)

### FIXED CODE ###

n = str(input())
if n.find('7') != -1:
    print('Yes')
else:
    print('No')
n = int(input())
numlist = list(map(int, input().split()))
if 0 in numlist:
    print(0)
else:
    ans = 1
    for i in numlist:
        ans *= i
        if ans > 10**18:
            print(-1)
            exit()
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
if 0 in a:
    print(0)
else:
    ans = 1
    for i in a:
        ans *= i
        if ans > 10**18:
            print(-1)
            exit()
    print(ans)
a,b,c = map( int , raw_input().split() )

if a < b < c:
  print 'a b c'
elif a < c < b:
  print 'a c b'
elif b < a < c:
  print 'b a c'
elif b < c < a:
  print 'b c a'
elif c < a < b:
  print 'c a b'
else c < b < a:
  print 'c b a'

### FIXED CODE ###

N = map( int , raw_input().split() )
 
if N[0] < N[1] < N[2] or N[0] == N[1] == N[2] or N[0] < N[1] == N[2] or N[0] == N[1] < N[2]:
  print "%d %d %d" %(N[0],N[1],N[2])
elif N[0] < N[2] < N[1]:
  print "%d %d %d" %(N[0],N[1],N[2])
elif N[1] < N[0] < N[2]:
  print "%d %d %d" %(N[1],N[0],N[2])
elif N[1] < N[2] < N[0] or N[1] < N[2] == N[0] or N[1] == N[2] < N[0]: 
  print "%d %d %d" %(N[1],N[2],N[0])
elif N[2] < N[0] < N[1] or N[2] < N[0] == N[1] or N[2] == N[0] < N[1]:
  print "%d %d %d" %(N[2],N[0],N[1])
elif N[2] < N[1] < N[0]:
  print "%d %d %d" %(N[2],N[1],N[0])
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()

p=limss()
q=limss()

arr=list(permutations(range(1,n+1)))

pans=0
qans=0
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()

p=limss()
q=limss()

arr=list(permutations(range(1,n+1)))

pans=0
qans=0
if p==q:
    print(0)
    exit()
for i,j in enumerate(range(factorial(n))):

    if "".join(p)=="".join(list(map(str,arr[i]))):
        pans=j
    elif "".join(q)=="".join(list(map(str,arr[i]))):
        qans=j
    
print(abs(pans-qans))

for i,j in enumerate(range(factorial(n))):

    if "".join(p)=="".join(list(map(str,arr[i]))):
        pans=j
    elif "".join(q)=="".join(list(map(str,arr[i]))):
        qans=j
    
print(abs(pans-qans))

### FIXED CODE ###

n=int(input())

import itertools
ans =[]
for i in itertools.permutations(range(1,n+1)):
    ans.append(list(i))
    

p = list(map(int,input().split()))
q = list(map(int,input().split()))

x = ans.index(p)+1
y = ans.index(q)+1

if x -y >=0:
    print(x-y)
elif x-y < 0:
    print(y-x)
#coding utf-8
from collections import deque
H,W=map(int,input().split())

s = [list(input().strip()) for _ in range(H)]
d = [[ 0 for i in range(W)] for j in range(H)]
q = deque([])
q.append([0,0,0])
y,x,z=q.popleft()

H = H-1
W = W-1

while y!=H or x!=W:
  if s[y][x]=="." and d[y][x]==0:
    if y<H:
      q.append([y+1,x,z+1])
    if x<W:
      q.append([y,x+1,z+1])
    if y>0:
      q.append([y-1,x,z+1])
    if x>0:
      q.append([y,x-1,z+1])
    d[y][x]=1  
  y,x,z=q.popleft()

ans1=0
for i in range(H+1):
  for j in range(W+1):
    if s[i][j]=="#":
      ans1 +=1
      
ans = (H+1)*(W+1)-ans1-z-1
print(ans)

  


### FIXED CODE ###

#coding utf-8
from collections import deque
H,W=map(int,input().split())

s = [list(input().strip()) for _ in range(H)]
d = [[ 0 for i in range(W)] for j in range(H)]
q = deque([])
q.append([0,0,0])
y,x,z=q.popleft()

H = H-1
W = W-1
ans2=0
while y!=H or x!=W:
  if s[y][x]=="." and d[y][x]==0:
    if y<H:
      q.append([y+1,x,z+1])
    if x<W:
      q.append([y,x+1,z+1])
    if y>0:
      q.append([y-1,x,z+1])
    if x>0:
      q.append([y,x-1,z+1])
    d[y][x]=1
  if q==deque([]):
    ans2 = -1
    break
  y,x,z=q.popleft()
  

ans1=0
for i in range(H+1):
  for j in range(W+1):
    if s[i][j]=="#":
      ans1 +=1
      
ans = (H+1)*(W+1)-ans1-z-1
if ans2==-1:
  print(ans2)
else:
  print(ans)
n=int(input())
s=input()

if n % 2 != 0:
  print('No')
else:
  m = n/2
  if s[:m-1] == s[m:]:
    print('Yes')

### FIXED CODE ###

n=int(input())
s=input()

if n % 2 != 0:
  print('No')
else:
  m = int(n/2)
  if s[:m] == s[m:]:
    print('Yes')
  else:
    print('No')
n=int(input())
 
#11桁で足りる
 
alp=[chr(ord('a') + i) for i in range(26)]
lst=[0]*11
 
for i in range(11):
    if n>=26**(10-i):
        a,n=divmod(n,26**(10-i))
        lst[i]=alp[a-1]
 
switch=0
for i in range(10):
    if lst[i]==0:
        if switch==0:
            lst.remove(0)
        else:
            lst[i]="a"
    else:
        switch=1
 
print("".join(lst))

### FIXED CODE ###

alp=[chr(i) for i in range(97,123)]
n=int(input())

for i in range(1,12):
    if n>26**i:
        n-=26**i
    else:
        keta=i
        break
#その桁数の名前のなかでn番目
n-=1
lst=[]
#このnを26進数で表し、0~25にa~zをあてはめる
for i in range(keta):
    p,n=divmod(n,26**(keta-i-1))
    lst.append(alp[p])
    
print("".join(lst))
import math
a=input()
l=2*pi()*a
print(l)

### FIXED CODE ###

import math

r=input()
r=int(r)
l=2*math.pi*r
print(l)
N= input()
S= input()


N = int(N)
Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。

ANSWER = ""
#リストの中身をループ
for SS in LIST:
    NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
    NUNBER = NUNBER -65#アスキーコードからアルファベット順に変更
    AFFTER = NUNBER + N
    LAST  = AFFTER % 26
    LAST  = chr(LAST+65)#アスキーコードからアルファベットに戻す
    ANSWER = ANSWER + LAST
    
print(ANSWER)

### FIXED CODE ###

S = input()

if S =="SUN":
    print(7)
elif S =="MON":
    print(6)
elif S =="TUE":
    print(5)
elif S =="WED":
    print(4)
elif S =="THU":
    print(3)
elif S =="FRI":
    print(2)
else:
    print(1)
X, Y, Z, K = list(map(int, input().split(' ')))

A = list(map(int, input().split(' ')))
B = list(map(int, input().split(' ')))
C = list(map(int, input().split(' ')))


A.sort()
A.reverse()
B.sort()
B.reverse()
C.sort()
C.reverse()

cal = []

def a(X,K):
  if X > K:
  	return K
  else:
    return X
  
for i in range(a(X,K-1000)):
  for j in range(a(Y,K-1000)):
    for k in range(a(Z,K-1000)):
      cal.append(A[i]+B[j]+C[k])

cal.sort()
cal.reverse()

for i in range(K):
  print(cal[i])


### FIXED CODE ###

anntena_list = []
 
for i in range(5):
    anntena_list.append(int(input()))
    
m = int(input())
    
flag = False
for i in range(4):
  for j in range(3-i):
    if anntena_list[4-i] - anntena_list[j]  > m:
      flag = True
      
if flag:
  print(':(')
else:
  print('Yay!')
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9+7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

# nC0~nCn odd or even
def nCk(n):
    num = [0]*(n+1)
    for i in range(n+1):
        now = 2
        while now <= i:
            num[i] += i//now
            now *= 2
    cumnum = [num[0]]
    for i in range(1,n+1):
        cumnum.append(cumnum[-1]+num[i])
    ret = [0]*(n+1)
    for i in range(n+1):
        if cumnum[n] > cumnum[i]+cumnum[n-i]:
            ret[i] = 0
        else:
            ret[i] = 1
    return ret

N = I()
A = list(input())
a = [0]*N
for i in range(N):
    a[i] = int(A[i])

b = [0]*(N-1)
for i in range(N-1):
    b[i] = abs(a[i]-a[i+1])

flag = False
for i in range(N-1):
    if b[i] == 1:
        flag = True
        break

nlist = nCk(N-2)

ans = 0
if not flag:
    for i in range(N-1):
        ans += nlist[i]*b[i]
        ans %= 4
    print(ans)
    #raise(ValueError)
else:
    for i in range(N-1):
        ans += nlist[i]*(b[i]%2)
        ans %= 2
    #print(ans)
    raise(ValueError)

### FIXED CODE ###

import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9+7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

# nC0~nCn odd or even
def nCk(n):
    num = [0]*(n+1)
    for i in range(n+1):
        now = 2
        while now <= i:
            num[i] += i//now
            now *= 2
    #cumnum = [num[0]]
    #for i in range(1,n+1):
    #    cumnum.append(cumnum[-1]+num[i])
    ret = [0]*(n+1)
    for i in range(n+1):
        if num[n] > num[i]+num[n-i]:
            ret[i] = 0
        else:
            ret[i] = 1
    return ret

N = I()

A = list(input())
a = [0]*N
for i in range(N):
    a[i] = int(A[i])

b = [0]*(N-1)
for i in range(N-1):
    b[i] = abs(a[i]-a[i+1])

flag = False
for i in range(N-1):
    if b[i] == 1:
        flag = True
        break

nlist = nCk(N-2)

ans = 0
if not flag:
    for i in range(N-1):
        ans += nlist[i]*b[i]
        ans %= 4
    print(ans)
    #raise(ValueError)
else:
    for i in range(N-1):
        ans += nlist[i]*(b[i]%2)
        ans %= 2
    print(ans)
    #raise(ValueError)
import math

N = input()
A = list(map(int, input().split()))

print(math.gcd(max(A), min(A)))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

X = [0 for i in range(N)]
Y = [0 for i in range(N)]

for i in range(1, N):
    X[i] = gcd(X[i-1], A[i-1])

for i in range(N-1)[::-1]:
    Y[i] = gcd(Y[i+1], A[i+1])

Z = [gcd(X[i], Y[i]) for i in range(N)]
print(max(Z))
a,b =map(int,input(),split())
ss = a*b
hf =ss//2
if a>1 and b>1:
	print(ss-hf)
else:
  print(1)

### FIXED CODE ###

a,b =map(int,input().split())
ss = a*b
hf =ss//2
if a>1 and b>1:
	print(ss-hf)
else:
  print(1)
import numpy as np
import sys,collections as cl
def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

Max = sys.maxsize
def l():
	return list(map(int,input().split()))
def m():
	return map(int,input().split())
def s(x):
	a = []
	aa = x[i]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a

n = int(input())

a = seachPrimeNum(55555)
aa = []
for i in range(len(a)):
	if a[i] % 5 == 1:
		aa.append(a[i])

print(" ".join(aa[:n]))


### FIXED CODE ###

import numpy as np
import sys,collections as cl
def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

Max = sys.maxsize
def l():
	return list(map(int,input().split()))
def m():
	return map(int,input().split())
def s(x):
	a = []
	aa = x[i]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a

n = int(input())

a = seachPrimeNum(55555)
aa = []
for i in range(len(a)):
	if a[i] % 5 == 1:
		aa.append(a[i])

print(" ".join(map(str,aa[:n])))
a,b,c,d=map(int,input().split())
e=abs(a-b)
f=abs(b-c)
g=abs(a-c)
if g>d and e>d or f>d
  print("No")
else:
  print("Yes")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
e=abs(a-b)
f=abs(b-c)
g=abs(a-c)
if g>d and (e>d or f>d):
  print("No")
else:
  print("Yes")
n = input("")
s = input("")
t = input("")
n = int(n)
ans = ""

for i in range(n):
    ans = ans + s[i]
    ans = ans + t[i]
    
print(ans)

### FIXED CODE ###

n = input("")
s,t= input("").split()
n = int(n)
ans = ""

for i in range(n):
    ans = ans + s[i]
    ans = ans + t[i]
    
print(ans)
n = int(input())
x = int(input())
t = int(input())
 
if(n%x==0):
  count = n//x
else:
  count = n//x + 1
 
print(count*t)

### FIXED CODE ###

n = []
n = input().split()
n_1 = int(n[0])
x = int(n[1])
t = int(n[2])
 
if(n_1%x==0):
  count,mod = divmod(n_1,x)
else:
  count,mod = divmod(n_1,x)
  count = count + 1
 
print(count*t)
import sys
n, m = map(int, input().split())
isExist=True
li2 = [[''] for i in range(n)]
for i in range(m):
    s, c = map(int, input().split())
    if (li2[s - 1][0] != '' and li2[s - 1][0] != c):
        isExist = False
    elif(s == 1 and c == 0):
            isExist = False
    else:
        li2[s - 1][0] = c
ans=''
if (not isExist):
        print(-1)
        sys.exit()
    else:
        print(0)
        sys.exit()
for i in range(n):
    if (li2[0][0] == ''):
        li2[0][0]=1
    if (li2[i][0] == ''):
        li2[i][0] = 0
for i in range(n):
    ans += str(li2[i][0])
if (n == 1 and m == 0):
    ans=0
print(int(ans))

### FIXED CODE ###

import sys
n, m = map(int, input().split())
isExist = True
isExist2=True
li2 = [[''] for i in range(n)]
for i in range(m):
    s, c = map(int, input().split())
    if (li2[s - 1][0] != '' and li2[s - 1][0] != c):
        isExist = False
    elif(s == 1 and c == 0):
            isExist2 = False
    else:
        li2[s - 1][0] = c
ans=''
if (not isExist):
        print(-1)
        sys.exit()
if (not isExist2):
    if (n == 1):
        print(0)
        sys.exit()
    else:
        print(-1)
        sys.exit()
for i in range(n):
    if (li2[0][0] == ''):
        li2[0][0]=1
    if (li2[i][0] == ''):
        li2[i][0] = 0
for i in range(n):
    ans += str(li2[i][0])
if (n == 1 and m == 0):
    ans=0
print(int(ans))
D,T,S = map(float,raw_input().split())
def intime(D,T,S):
  if D<=T*S:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

A, B, C = map(int, input().split())
if A <= B*C:
  print('Yes')
else:
  print('No')
s=input()
first=int(s[0]+s[1])
second=int(s[2]+s[3])
if 1<=first<=12 and 1<=second<=12:
	print("AMBIGUOUS")
elif 1<=first<=12 and (second==0 or second>=13):
		print("MMYY")
elif (first==0 or first>=13) or 1<=second<=12:
		print("YYMM")
else:
		print("NA")

### FIXED CODE ###

n,k=map(int,input().split())
s=input()
if s[k-1]=="A":
	print(s[0:k-1]+"a"+s[k:n])
elif s[k-1]=="B":
	print(s[0:k-1]+"b"+s[k:n])
else:
	print(s[0:k-1]+"c"+s[k:n])
A,B,C=map(int(),input().split())
print(A*B//2)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(a*b//2)
n,m,x=map(int,input().split())
ans=999999999999999999
a=[0]*m
for i in range(n):
  a[i]=list(map(int,input().split()))
for i in range(2**n):
  t=[0]*m
  temp=0
  for j in range(n):
    if (i>>j)&1:
      temp=temp+a[j][0]
      for k in range(m):
        t[k]=t[k]+a[j][k+1]
  if min(t)>=x:
    ans=min(ans,temp)
print(ans)

### FIXED CODE ###

n,m,x=map(int,input().split())
ans=999999999999999999
a=[0]*n
for i in range(n):
  a[i]=list(map(int,input().split()))
for i in range(2**n):
  t=[0]*m
  temp=0
  for j in range(n):
    if (i>>j)&1:
      temp=temp+a[j][0]
      for k in range(m):
        t[k]=t[k]+a[j][k+1]
  if min(t)>=x:
    ans=min(ans,temp)
if ans==999999999999999999:
  print(-1)
else:
  print(ans)
N, M = map(int, input().strip().split())

for i in range(M//N,0,-1):
    if M%i==0:
        print(i)
        break

### FIXED CODE ###

N=int(input().strip())
xyh=[]
for i in range(N):
    xi,yi,hi = map(int, input().split(' '))
    xyh.append([xi,yi,hi])
    if hi>=1:
        xyhset=[xi,yi,hi]
        
for nx in range(101):
    for ny in range(101):
        He = xyhset[2]+abs(xyhset[0]-nx)+abs(xyhset[1]-ny)
        He=max(0,He)
        flag=True
        for i in range(N):
            h=He-abs(xyh[i][0]-nx)-abs(xyh[i][1]-ny)
            h=max(0,h)
            if xyh[i][2]!=h:
                flag=False
        if flag:
            ax=nx
            ay=ny
            ah=He

print("{} {} {}".format(ax,ay,ah))
S=input()
max=0
for i in range(len(S)):
  if (S[i]=="A" or S[i]=="T" or S[i]=="C" or S[i]=="G"):
    l+=1
  else:
    if max<l:
      max=l
    l=0
print(l)

### FIXED CODE ###

S=input()
max=0
l=0
for s in S:
  if (s=="A" or s=="T" or s=="C" or s=="G"):
    l+=1
  else:
    if max<l:
      max=l
    l=0
if max<l:
  max=l
print(max)