Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(10000)

import numpy as np

def acinput():
    return list(map(int, input().split(" ")))


S=input()
d=["Sunny","Cloudy","Rainy"]

print(d[d.index(S)+1])




### FIXED CODE ###



def acinput():
    return list(map(int, input().split(" ")))


S=input()
d=["Sunny","Cloudy","Rainy","Sunny"]

print(d[d.index(S)+1])
def toId(i, j):
    pair = A[i][j]
    if i > pair:
        i, pair = pair, i
    return ids[i][pair]

def dfs(x):
    if dp[x] != -1:
        if done[x]:
            return dp[x]
        else:
            return -1
    dp[x] = 1
    for y in G[x]:
        res = dfs(y)
        if res == -1:
            return -1
        dp[x] = max(dp[x], dfs(y)+1)
    done[x] = True
    return dp[x]

N = int(input())
A = [list(map(lambda x: int(x)-1, input().split())) for i in range(N)]
ids = [[0]*N for i in range(N)]
num = 0
for i in range(N):
    for j in range(N):
        if i < j:
            ids[i][j] = num
            num += 1
allv = N*(N-1)//2
G = [[] for i in range(allv)]
for i in range(N):
    for j in range(N-2):
        G[toId(i,j+1)].append(toId(i,j))
dp = [-1 for i in range(allv)]
done = [False for i in range(allv)]
ans = 0
for i in range(allv):
    res = dfs(i)
    if res == -1:
        print(-1)
        exit()
    ans = max(ans, dfs(i))
print(ans)

### FIXED CODE ###

N = int(input())
A = [list(map(lambda n: int(n)-1, input().split())) for i in range(N)]
cur = [0 for i in range(N)]
que = [i for i in range(N)]
ans = 0
while len(que) > 0:
    done = {}
    que2 = []
    for n in que:
        if done.get(n):
            continue
        pair = A[n][cur[n]]
        if done.get(pair):
            continue
        if n == A[pair][cur[pair]]:
            cur[n] += 1
            cur[pair] += 1
            done[n] = True
            done[pair] = True
            if cur[n] < N-1:
                que2.append(n)
            if cur[pair] < N-1:
                que2.append(pair)
    if len(done) > 0:
        ans += 1
    que = que2
ok = True
for i in range(N):
    if cur[i] < N-1:
        ok = False
if ok:
    print(ans)
else:
    print(-1)
while input():
 s=list(map(int,input().split()))
 n=len(s)
 a=sum(s)/n
 print((sum([x*x for x in s])/n-a*a)**.5)


### FIXED CODE ###

while int(input()):
 s=list(map(int,input().split()))
 n=len(s)
 a=sum(s)/n
 print((sum(x*x for x in s)/n-a*a)**.5)
a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print(sum(min(a,b)+min(c,d)))

### FIXED CODE ###

a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print((min(a,b)+min(c,d)))
# C - Typical Stairs

MOD = 1000000007
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
dp = [None] * (N + 1)

def f(i):
    if dp[i] != None:
        return dp[i] % MOD
    else:
        if i in A:
            dp[i] = 0
        elif i < 2:
            dp[i] = 1
        else:
            dp[i] = f(i - 1) + f(i - 2)
        return dp[i] % MOD

print(f(N))


### FIXED CODE ###

# C - Typical Stairs

MOD = (10 ** 9) + 7
N, M = map(int, input().split())
A = [False] * (N + 1)
for _ in range(M):
    A[int(input())] = True
dp = [0] * (N + 1)
dp[0] = 1
if A[1] == False:
    dp[1] = 1

for i in range(2, N + 1):
    if A[i] == True:
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD

print(dp[N])
n,m = map(int, input().split( ))
p= [i for i in range(n)]+[n+j for j in range(m)]
rk = [0]*(n+m)
def rt(a):
    if a==p[a]:
        return a
    p[a] = rt(p[a])
    return p[a]
def uni(a,b):
    ra = rt(a);rb=rt(b)
    if ra==rb:
        return
    if rk[ra]>rk[rb]:
        p[rb] = ra
    else:
        if rk[ra]==rk[rb]:
            p[ra] = rb
            rk[ra]+=1
        else:
            p[ra]=rb 
    return

kl = {}
for i in range(n):
    ki,*li, = map(int, input().split( ))
    kl[i] = li
for ki in kl:
    for j in range(len(kl[ki])):
        kl[ki][j]-=1

for ki in kl:
    for lij in kl[ki]:
        uni(ki,lij+n)
for i in range(n):
    rt(i)
if len(set(p[:n]))==1:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

n,m = map(int, input().split( ))
p= [i for i in range(n)]+[n+j for j in range(m)]
rk = [0]*(n+m)
def rt(a):
    if a==p[a]:
        return a
    p[a] = rt(p[a])
    return p[a]
def uni(a,b):
    ra = rt(a);rb=rt(b)
    if ra==rb:
        return
    if rk[ra]>rk[rb]:
        p[rb] = ra
    else:
        if rk[ra]==rk[rb]:
            p[ra] = rb
            rk[rb]+=1
        else:
            p[ra]=rb 
    return

kl = {}
for i in range(n):
    ki,*li, = map(int, input().split( ))
    kl[i] = li
for ki in kl:
    for j in range(len(kl[ki])):
        kl[ki][j]-=1

for ki in kl:
    for lij in kl[ki]:
        uni(ki,lij+n)
for i in range(n):
    rt(i)
if len(set(p[:n]))==1:
    print("YES")
else:
    print("NO")
N=int(input())
n=N*N*N
print(n

### FIXED CODE ###

N=int(input())
n= N*N*N
print(n)
from itertools import product

H, W, K = map(int, input().split())

C = [list(input().split()) for _ in range(H)]

ans = 0

for row_bit in product(range(2), repeat = H):
    for col_bit in product(range(2), repeat = W):
        cnt = 0
        for row in range(H):
            for col in range(W):
                if C[row][col] == "#" and (row_bit[row] and col_bit[col]):
                    cnt += 1
            if cnt == K:
                ans += 1
print(ans)

### FIXED CODE ###

from itertools import product

h, w, k = map(int, input().split())
c = [list(input()) for _ in range(h)]

ans = 0

for row_bit in product(range(2), repeat=h):
    for col_bit in product(range(2), repeat=w):
        cnt = 0
        for row in range(h):
            for col in range(w):
                if c[row][col] == "#" and (row_bit[row] and col_bit[col]):
                    cnt += 1
        if cnt == k:
            ans += 1

print(ans)
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

ans = sum(p[:x]) + sum(q[:y])

i, j = 0, 0
while i < x and j < y and i + j < c:
    change = min(p[x - 1 - i], q[y - 1 - j])
    if r[i + j] > change:
        ans += r[i + j] - change
    elif:
        break
    if p[x - 1 - i] < q[y - 1 - j]:
        i += 1
    elif p[x - 1 - i] > q[y - 1 - j]:
        j += 1
    else:
        s, t = 0, 0
        while i + s < x and j + t < y and i + j + s + t < c:
            if p[x - 1 - i - s] < q[y - 1 - j - s]:
                i += 1
                break
            elif p[x - 1 - i - s] > q[y - 1 - j - s]:
                j += 1
                break
            else:
                s += 1
                t += 1
                if not(i + s < x and j + t < y and i + j + s + t < c):
                    i += 1
                    break

print(ans)

### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

a = []
a.extend(p[:x])
a.extend(q[:y])
a.extend(r)
a.sort(reverse=True)

print(sum(a[:x + y]))
class BIT:
    """1-indexed BIT
    """

    def __init__(self, size: int):
        """サイズを指定して BIT を初期化します。
        """
        # BIT のサイズは 2^n + 1
        self.__size = size + 1

        # 実際の配列
        self.__bit = [0] * self.__size

    def add(self, idx: int, val: int):
        """位置 idx (1-indexed) に値 val をたす。
        :param idx: 値を追加したいインデックス
        :param val: 追加したい値
        """
        while idx < self.__size:
            self.__bit[idx] += val
            idx += idx & (-idx)

    def sum(self, l: int, r: int)->int:
        """(l, r] の累積和を計算する。
        :param l: left index
        :param r: right index
        :return: (l, r] の累積和
        """
        return self.__sum__(r) - self.__sum__(l)

    def __sum__(self, idx: int)->int:
        s = 0
        while idx > 0:
            s += self.__bit[idx]
            idx -= idx & (-idx)
        return s


def inversion(A: list) -> int:
    bit = BIT(max(A))
    s = 0
    for a in A[1:]:
        bit.add(a, 1)
        s += bit.sum(0, a)

    return a


def check(A: list, x: int)->int:
    n = len(A)
    S = [0] * (n + 1)
    for i in range(n):
        S[i + 1] = S[i] + (1 if x <= A[i] else - 1)

    m = min(S)
    for i in range(n):
        S[i+1] -= m - 1

    return inversion(S[1:])


def median_of_medians(N: int, A: list)->int:
    alpha = sorted(A)
    l, r = 0, N
    m, c = N//2, N*(N+1)//2
    while True:
        if check(A, alpha[m]) <= c//2:
            if m == N-1:
                break
            elif check(A, alpha[m+1]) > c//2:
                break
            else:
                l, m = m, (m+r)//2
        else:
            m, r = (m+l)//2, m+1

    return alpha[m]


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = median_of_medians(N, A)
    print(ans)


### FIXED CODE ###


def median_of_medians(N: int, A: list)->int:
    def search(c):
        bar = N
        r = 0
        res_nega = 0
        dp_arr = [0]*(2*N+1)
        for i in range(N):
            dp_arr[bar] += 1
            if A[i] < c:
                r += dp_arr[bar]
                bar += 1
            else:
                r -= (dp_arr[bar-1])
                bar -= 1
            res_nega += r
        return res_nega

    # binary search
    a_sorted = sorted(A)
    left = 0
    right = N
    mid = N // 2
    C = N*(N+1) // 2
    while True:
        if search(a_sorted[mid]) <= C // 2:
            if mid == N-1:
                break
            elif search(a_sorted[mid+1]) > C // 2:
                break
            else:
                left = mid
                mid = (mid + right) // 2
        else:
            right = mid + 1
            mid = (mid + left) // 2

    return a_sorted[mid]


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = median_of_medians(N, A)
    print(ans)
n = int(input())
a = [int(i) for i in input().split()]
ans = 1
if 0 in a:
	print(0)
	exit()
for i in range(n):
	ans += a[i]
	if ans > 10 ** 18:
		print(-1)
		exit()
print(ans)n = int(input())
a = [int(i) for i in input().split()]
ans = 1
if 0 in a:
	print(0)
	exit()
for i in range(n):
	ans += a[i]
	if ans > 10 ** 18:
		print(-1)
		exit()
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
ans = 1
if 0 in a:
	print(0)
	exit()
for i in range(n):
	ans *= a[i]
	if ans > 10 ** 18:
		print(-1)
		exit()
print(ans)
n = int(input())
m = int(input())
print((n - 1) * (m - 1))

### FIXED CODE ###

n, m = map(int, input().split())
print((n - 1) * (m - 1))
from fractions import gcd
A,B,C,D = map(int,input().split())

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
CD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0

print(ans)


### FIXED CODE ###

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

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
i = D
j = C % D
while j > 0:
    k = j
    j = i % j
    i = k

CD_mod0 = B*i // (C*D) - (A-1)*i // (C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0

print(ans)
*a, = map(int,input().split())
print(max(a)-min(a))

### FIXED CODE ###

a,b,c = input().split(",")
print(a,b,c)
X,Y  = input().split()
X = int(X)
Y = int(Y)
if (X+Y)%3 != 0:
    print(0)
else:
    n = (2*X-Y)/3
    m = (2*Y-X)/3
    top = 1
    bot = 1
    n = int(n)
    m = int(m)
    for i in range(n):
        top *= (n + m) - i
        bot *= n - i

result = (top/bot) % ((10**9)+7)

print(result)


### FIXED CODE ###

r = int(input())

print(r**2)
import sys
import math
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)]

l = 9
ans = 0
for _ in range(5):
    num = ni()
    ans += -(-num//10) * 10
    if num % 10 != 0 and l > num % 10:
        l = num % 10
    elif num % 10 == 0:
        l = 10
if l != 0:
    ans += - 10 + l
print(ans)
```‘

### FIXED CODE ###

import sys
import math
import numpy as np
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 = []
for _ in range(5):
    a.append(ni())
a = np.array(a)

m = np.min((a-1)%10+1)
d = (a - 1) // 10 + 1
print(sum(d)*10 + m - 10)
temp=input().split()
N=int(temp[0])
D=int(temp[1])

points=[]
for i in range(N):
  temp=input().split()
  points.add([int(temp[x]) for x in range(D)])
  
counter=0
for i in range(N):
  for j in range(i+1, N):
    l=pow(sum([pow(points[i, x]-points[j, x], 2) for x in range(D)]), 1/2)
    if l==int(l):
      counter+=1
      
print(counter)

### FIXED CODE ###

temp=input().split()
N=int(temp[0])
D=int(temp[1])

points=[]
for i in range(N):
  temp=input().split()
  points.append([int(temp[x]) for x in range(D)])
  
counter=0
for i in range(N):
  for j in range(i+1, N):
    l=pow(sum([pow(points[i][x]-points[j][x], 2) for x in range(D)]), 1/2)
    if l.is_integer():
      counter+=1
      
print(counter)
#include <bits/stdc++.h>
using namespace std;

int main(){
  cout<<"Hello"<<endl;
}

### FIXED CODE ###

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

flag=True
for a in A:
    if a%2==0:
        if (a%3!=0)&(a%5!=0):
            flag=False
            break

if flag:
    print("APPROVED")
else:
    print("DENIED")
def cal(k):
  for a,b in AB:
    tmp = k-a
    if tmp<0:
      tmp = 0
    new = dp[tmp]+b
    if new<dp[k]:
      dp[k]=new
def main():
  H,N = map(int,input().split())
  AB = [list(map(int,input().split())) for _ in range(N)]
  mi_a,mi_b = min(AB,key = lambda x:x[1])
  INF = float('inf')
  dp = [0]+[mi_b]*mi_a+[INF]*H
  for i in range(mi_a+1,H+1):
    cal(i)

  print(dp[H])
  

main()

### FIXED CODE ###

H,N = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N)]
INF = float('inf')
dp = [INF]*(H+1)
dp[0] = 0
for i in range(1,H+1):
  for k in AB:
    a = k[0]
    b = k[1]
    tmp = max(0,i-a)
    dp[i] = min(dp[i],dp[tmp]+b)
    
print(dp[H])
def check(n):
    x = A[n] + M
    B = A[:n] + A[n+1:-(P-1)]
    scores = M * (V - P)
    if x < B[-1]:
        return False
    for b in B:
        if b + M <= x:
            scores -= M
        else:
            scores -= x - b
        if scores <= 0:
            return True
    return False


N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
print(A)
left = 0
right = N - P
while left < right:
    mid = (left+right) // 2
    if check(mid):
        right = mid
    else:
        left = mid + 1
print(N - left)


### FIXED CODE ###

def check(n):
    x = A[n] + M
    if P == 1:
        B = A[:n] + A[n+1:]
    else:
        B = A[:n] + A[n+1:-(P-1)]
    scores = M * (V - P)
    if x < B[-1]:
        return False
    for b in B:
        if b + M <= x:
            scores -= M
        else:
            scores -= x - b
        if scores <= 0:
            return True
    return False


N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
A.sort()

left = 0
right = N - P
while left < right:
    mid = (left+right) // 2
    if check(mid):
        right = mid
    else:
        left = mid + 1
print(N - left)
W, H, x, y = map(float, input().split())

S = W * H / 2

flag = 0
if x == W / 2 and y == H / 2:
    flag = 1

if 
print(S, flag)


### FIXED CODE ###

W, H, x, y = map(float, input().split())

S = W * H / 2

flag = 0
if x == W / 2 and y == H / 2:
    flag = 1

print(S, flag)
N = int(input())
ans = 1
 
i = []
 
i = [int(a) for a in input().split()]

if 0 in i:
  print(0)
  break
 
	for b in range(N):
  		ans = ans * i[b]
 
  		if ans > 10**18:
   		 	ans = -1
    		break
 
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))

ans = 1

if 0 in a:
    print("0")
    exit()

for i in a:
    ans *= i

    if ans > 10**18:
        print("-1")
        exit()
        
print(ans)
def gcd(a,b):
  a = int(a)
  b = int(b)
  r = (int)(a%b)
  while(r!=0):
    a=(int)(b)
    b=(int)(r)
    r=(int)(a%b)
  return b
def lcm(a,b):
    return (a*b)/gcd(a,b)
n = int(input())
ans = int(input())
for i in range(n-1):
  num = int(input())
  ans = lcm(max(ans,num),min(ans,num))
print(int(ans))


### FIXED CODE ###

def gcd(a,b):
  a = int(a)
  b = int(b)
  r = (int)(a%b)
  while(r!=0):
    a=(int)(b)
    b=(int)(r)
    r=(int)(a%b)
  return b
def lcm(a,b):
    return int((a*b)//gcd(a,b))
n = int(input())
ans = int(input())
for i in range(n-1):
  num = int(input())
  ans = lcm(max(ans,num),min(ans,num))
print(int(ans))
import math
A, B, C, D = map(int, input().split())
NBC = B//C
NBD = B//D
CD_lcm = (C*D)//math.gcd(C,D)   #CとDの最小公倍数
NBCD = B//CD_lcm #CとD共通で割り切れる数
B_0 = (NBC+NBD)-NBCD  #Bの答え
ans_B = B-B_0
NAC = (A)//C
NAD = (A)//D
NACD = (A)//CD_lcm  
A_0 = (NAC+NAD)-NACD #Aの答え
ans_A = A-A_0
if A%C==0 or A%D==0:
    ans = ans_B-ans_A
else:
    ans = ans_B-ans_A+1
print(ans)

### FIXED CODE ###

A, B, C, D = map(int, input().split())
def gcd(x,y):
    while y!=0:
        x,y=y,x%y
    return x

NBC = B//C
NBD = B//D
CD_lcm = (C*D)//gcd(C,D)   #CとDの最小公倍数
NBCD = B//CD_lcm #CとD共通で割り切れる数
B_0 = (NBC+NBD)-NBCD  #Bの答え
ans_B = B-B_0
NAC = (A)//C
NAD = (A)//D
NACD = (A)//CD_lcm  
A_0 = (NAC+NAD)-NACD #Aの答え
ans_A = A-A_0
if A%C==0 or A%D==0:
    ans = ans_B-ans_A
else:
    ans = ans_B-ans_A+1
print(ans)
#include <iostream>
using namespace std;

int main() {
  int num=753, min=999;
  string s;
  cin >> s;

  for (int i=0; i<s.size()-2; i++) {
    int dif=abs(num-stoi(s.substr(i, 3)));

    if (dif<min) min=dif;
  }

  cout << min;
}

### FIXED CODE ###

num=753; mindif=753
s=input()

for i in range(len(s)-2):
    dif=abs(int(s[i:i+3])-num)
    
    if (dif<mindif):
        mindif=dif

print(mindif)
n, a, b = map(int, input().split())
str = ''
while len(str) < n:
    str += 'b'*a + 'r'*b
ans_str = str[0:n]
print(ans_str.count('b'))

### FIXED CODE ###

n, a, b = map(int, input().split())
quo = n // (a+b)
rem = n % (a+b)
ans = quo*a
if rem == 0:
    print(ans)
elif rem < a:
    print(ans + rem)
else:
    print(ans + a)
A, B = map(int, input().split())

if B % A == 0:
    print(B // A)
else:
    if B < A:
        print(a)
    else:
        print(B // A + 1)

### FIXED CODE ###

A, B = map(int, input().split())
ans = 0
sum = 0

if B == 1:
    print(0)
else:
    ans += 1
    sum += A
    while True:
        if sum >= B:
            print(ans)
            break
        else:
            ans += 1
            sum += A - 1
l=list(map(int,input().split()))
r=l[0]
D=l[1]
x=l[2]
t=[x]
for i in t:
  m=i*r-D
  t.append(m)
  if(len(t)=11):
    break
for p in t[1:]:
	print(p)


### FIXED CODE ###

l=list(map(int,input().split()))
r=l[0]
D=l[1]
x=l[2]
t=[x]
for i in t:
  m=i*r-D
  t.append(m)
  if(len(t)==11):
    break
for p in t[1:]:
	print(p)
N ,R = map(int, input().split())
if N >=10:
  print(R)
  
else:
  r = 100*(10 - N)
  R = R -n
  print(R)
  

### FIXED CODE ###

N ,R = map(int, input().split())
if N >=10:
  print(R)
  
else:
  r = 100*(10 - N)
  R = R + r
  print(R)
import sys

def solve():
    input = lambda: sys.stdin.readline().rstrip()
    sys.setrecursionlimit(10 ** 7)
    mod = 10 ** 9 + 7
    
    def comb(n, r):
        if r > n: return 0
        return fac[n] * inv[r] * inv[n - r] % mod

    def dfs(v, Pa=-1):
        for u in to[v]:
            if u == Pa: continue
            dfs(u, v)
            size[v] += size[u]
            dp[v] *= dp[u] % mod
            dp[v] *= comb(size[v], size[u]) % mod
        size[v] += 1

    def bfs(v, Pa=-1, P_val=1, P_sz=0):
        ans[v] = P_val * dp[v] * comb(n - 1, P_sz) % mod
        for u in to[v]:
            if u == Pa: continue
            val = ans[v] * INV(dp[u] * comb(n - 1, size[u])) % mod
            bfs(u, v, val, n - size[u])

    n = int(input())
    to = [[] for _ in range(n)]
    for _ in range(n - 1):
        a, b = map(lambda x: int(x) - 1, input().split())
        to[a].append(b)
        to[b].append(a)

    fac = [1] * (n + 2)
    inv = [1] * (n + 2)

    for i in range(2, n + 1):
        fac[i] = fac[i - 1] * i % mod
    INV = lambda x: pow(x, mod - 2, mod)
    inv[n] = INV(fac[n])
    for i in range(n - 1, 1, -1):
        inv[i] = inv[i + 1] * (i + 1) % mod

    dp = [1] * n
    size = [0] * n
    ans = [0] * n

    dfs(0)
    bfs(0)
    print(*ans, sep='\n')

if __name__ == '__main__':
    solve()

### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
    print('Yes')
else:
    print('No')
N = int(input())
S, T = map(String, input().split()) 
if(len(S)==len(T)):
  print(S+T)

### FIXED CODE ###

n = int(input())
s,t = input().split()
 
ans = []
 
for i in range(n):
    ans.append(s[i])
    ans.append(t[i])
    
print("".join(ans))
A,B,N = list(map(int , input().split()))

if N>B:
    x = B -1
else:
    x = N
D = []

for i in range(N//2):
    F1 = (A*(x-i))//B
    F2 = A * ((x-i)//B)
    S = F1 - F2
    D.append(S)

ans = max(D)
print(ans)

### FIXED CODE ###

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

if N>B:
    x = B -1
else:
    x = N
D = []

if N > 20:
    w = N % 15 + 5
elif N > 4:
    w = N-1
else:
    w = N
for i in range(w):
    F1 = (A*(x-i))//B
    F2 = A * ((x-i)//B)
    S = F1 - F2
    D.append(S)

ans = max(D)
print(ans)
N = int(input())
a = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
    tmp = N - i
    kosuu = N // tmp
    if kosuu == 1:
        if a[tmp-1] == 1:
            ans[tmp-1] = 1
    else:
        for j in range(kosuu-1):
            sub_sum += ans[tmp * (j + 2) -1]
            if a[tmp-1] != sub_sum % 2:
                ans[tmp-1] = 1

print(sum(ans))
print(*ans)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
    tmp = N - i
    kosuu = N // tmp
    if kosuu == 1:
        if a[tmp-1] == 1:
            ans[tmp-1] = 1
    else:
        sub_sum = 0
        for j in range(kosuu-1):
            sub_sum += ans[tmp * (j + 2) -1]
        if a[tmp-1] != sub_sum % 2:
            ans[tmp-1] = 1
            
true_ans = []
for i in range(N):
    if ans[i] == 1:
        true_ans.append(i + 1)
print(sum(ans))
print(*true_ans)
import fractions

n, m = map(int, input().split())
s = input()
t = input()
check = [''] * (n * m)
l = n * m // fractions.gcd(n, m)
for i in range(n):
    check[i * l // n] = s[i]
for i in range(m):
    if check[i * l // m] != t[i] and check[i * l // m] != '':
        print(-1)
        exit()
print(l)


### FIXED CODE ###

import fractions


def binary_search(list, number, item):
    low = 0
    high = len(list) - 1

    while low <= high:
        mid = (low + high) // 2
        guess = list[mid][0]
        if guess == number:
            if list[mid][1] == item:
                return False
            else:
                return True
        if guess > number:
            high = mid - 1
        else:
            low = mid + 1
    # 見つからなかったとき
    return False


n, m = map(int, input().split())
s = input()
t = input()
check = []
l = n * m // fractions.gcd(n, m)
for i in range(n):
    check.append([i * l // n, s[i]])
for i in range(m):
    if binary_search(check, i * l // m, t[i]):
        print(-1)
        exit()
print(l)
S = str(input())
count = 0
X =[]
for s in S:
    if s == 'A' or s == 'T' or s == 'C' or s == 'G':
        count += 1
    else:
        X.append(count)
print(int(max(X)))

### FIXED CODE ###

S = str(input())

count = 0
X =[]
for n in range(len(S)):
    if n != len(S) -1:
        if S[n] == 'A' or S[n] == 'T' or S[n] == 'C' or S[n] == 'G':
            count += 1
        else:
            X.append(count)
            count = 0
    else:
        if S[n] == 'A' or S[n] == 'T' or S[n] == 'C' or S[n] == 'G':
            count += 1
            X.append(count)
        else:
            X.append(count)
print(int(max(X)))