Harryxun/stf_run huggingface dataset:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print('No War' if max(*x,X)<=min(*y,Y) else 'War')

### FIXED CODE ###

N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

print('No War' if min(min(y),Y)>max(max(x),X) else 'War')
N, K = [int(x) for x in input().split(' ')]
m = 10**9 + 7
import math
def combination(n, r):
  return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
  
for k in range(1, N-K+2):
  print(combination(N-K+1, k) % m * combination(K-1, k-1))


### FIXED CODE ###

N, K = [int(x) for x in input().split(' ')]
m = 10**9 + 7
fact = [1] * (N+1)
for i in range(1, N+1):
  fact[i] = fact[i-1] * i
  
def combination(n, r):
  return fact[n] // fact[r] // fact[n-r]
  
for k in range(1, K+1):
  print(combination(N-K+1, k) % m * combination(K-1, k-1) % m)
from sys import stdin
import math


def main():
    n, k = list(map(int, input().split()))
    A = list(map(int, stdin.readline().split()))
    roots = []
    roots.append(A)
    maxLoop = math.ceil(math.log(k)/math.log(2))
    for _ in range(1, maxLoop):
        roots_tmp = [None] * n
        for j in range(n):
            roots_tmp[j] = roots[-1][roots[-1][j]-1]
        roots.append(roots_tmp)

    position = 1
    for i in range(maxLoop+1):
        if k & (1 << (maxLoop-i)):
            position = roots[-1-i][position-1]

    print(position)

if __name__ == '__main__':
    main()


### FIXED CODE ###

from sys import stdin


def main():
    n, k = list(map(int, input().split()))
    A = list(map(int, stdin.readline().split()))
    roots = [1]
    position = 0
    for _ in range(n):
        position = A[roots[-1]-1]
        A[roots[-1]-1] = - position
        if position < 0:
            break
        roots.append(position)

    x = roots.index(-position)
    y = len(roots) - x

    if k <= x:
        print(roots[k])
    elif k > x:
        print(roots[x + ((k-x) % y)])


if __name__ == '__main__':
    main()
import numpy

inData = input().split(' ')
mseCnt = int(inData[0])
mustCnt = int(inData[1])
neDanList = []
mseJ = {}
byCnt = 0
byMany = 0
for i in range(0, mseCnt):
    inData2 = input().split(' ')
    if inData[0] in mseJ:
        mseJ[inData2[0]] = mseJ[inData[0]] + int(inData2[1])
    else:
        mseJ[inData2[0]] = int(inData2[1])
    neDanList.append(inData2[0])

neDanList = list(set(neDanList))
neDanList = sorted(neDanList)

for i in range(0, mseCnt):
    for j in range(0, int(mseJ[str(neDanList[i])])):
        if byCnt == mustCnt:
            break
        else:
            byCnt += 1
            byMany += int(neDanList[i])
    if byCnt == mustCnt:
        break

print(byMany)

### FIXED CODE ###

N, M = map(int, input().split())
mseList = [list(map(int, input().split())) for i in range(0, N)]
mseList = sorted(mseList, key=lambda x:x[0])
total = 0
for i, k in mseList:
    if k < M:
        total += i * k
        M -= k
    else:
        total += i * M
        break
print(total)
S = input()
T = input()

if S>=(T+2):
    countbox=[]
    for n in range(len(S)-2-len(T)+1):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n+1]:
                count+=1
        countbox.append(count)
    print(min(countbox))
else:
    print(0)

### FIXED CODE ###

S = input()
T = input()

if len(S)==len(T):
    count=0
    for i in range(len(T)):
        if T[i] != S[i]:
            count+=1
    print(count)

else:
    countbox=[]
    for n in range(len(S)-len(T)+1):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n]:
                count+=1
        countbox.append(count)
    print(min(countbox))
# -*- coding: utf-8 -*-

def main():

    S = input()

    if S == 'Sunny':
        ans = 'Cloudy'

    elif S == 'Cloudy':
        ams = 'Rainy'

    else:
        ans = 'Sunny'

    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# -*- coding: utf-8 -*-

def main():

    S = input()

    if S == 'Sunny':
        ans = 'Cloudy'

    elif S == 'Cloudy':
        ans = 'Rainy'

    else:
        ans = 'Sunny'

    print(ans)


if __name__ == "__main__":
    main()
import numpy as np
inputs = open(0).readlines()

def main(inputs):
    h, w, k = map(int, inputs[0].split())
    cake, count, coord = np.zeros((h, w), dtype=np.uint), 0, {}
    for i, s in enumerate(inputs[1:]):
        for j, c in enumerate(s):
            if c == '#':
                count += 1
                cake[i, j] = count
                coords[count] = (j, i)
    empty_rows = {i for i, rows in enumerate(cake) if not np.any(rows)}

    for i in range(1, count+1):
        x, y = coords[i]
        x0, y0 = x-1, y-1
        x1, y1 = x+1, y+1
        while 0 <= x0 and cake[y, x0] == 0:
            cake[y, x0] = i
            x0 -= 1
        x0 += 1
        while x1 < w and cake[y, x1] == 0:
            cake[y, x1] = i
            x1 += 1
        while 0 <= y0 and y0 in empty_rows:
            cake[y0, x0:x1] = i
            y0 -= 1
        while y1 < h and y1 in empty_rows:
            cake[y1, x0:x1] = i
            y1 += 1

    for rows in cake:
        print(*rows)

main(inputs)

### FIXED CODE ###

import numpy as np
inputs = open(0).readlines()

def main(inputs):
    h, w, k = map(int, inputs[0].split())
    cake, count, coords = np.zeros((h, w), dtype=np.uint), 0, {}
    for i, s in enumerate(inputs[1:]):
        for j, c in enumerate(s):
            if c == '#':
                count += 1
                cake[i, j] = count
                coords[count] = (j, i)
    empty_rows = {i for i, rows in enumerate(cake) if not np.any(rows)}

    for i in range(1, count+1):
        x, y = coords[i]
        x0, y0 = x-1, y-1
        x1, y1 = x+1, y+1
        while 0 <= x0 and cake[y, x0] == 0:
            cake[y, x0] = i
            x0 -= 1
        x0 += 1
        while x1 < w and cake[y, x1] == 0:
            cake[y, x1] = i
            x1 += 1
        while 0 <= y0 and y0 in empty_rows:
            cake[y0, x0:x1] = i
            y0 -= 1
        while y1 < h and y1 in empty_rows:
            cake[y1, x0:x1] = i
            y1 += 1

    for rows in cake:
        print(*rows)

main(inputs)
Nc = input()
N = int(Nc)
cor = ''
c = map(int,input().split())
l = list(c)
l2 = []
l3 = []
maxL = 0

for num in l:
    if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int:
        if  1 <= num <= 399:
            cor = 'cinzento'
            l2.append(cor)
        elif 400 <= num <= 799:
            cor = 'castanho'
            l2.append(cor)
        elif 800 <= num <= 1199:
            cor = 'verde'
            l2.append(cor)
        elif 1200 <= num <= 1599:
            cor = 'ciano'
            l2.append(cor)
        elif 1600 <= num <= 1999:
            cor = 'azul'
            l2.append(cor)
        elif 2000 <= num <= 2399:
            cor = 'amarelo'
            l2.append(cor)
        elif 2400 <= num <= 2799:
            cor = 'laranja'
            l2.append(cor)
        elif 2800 <= num <= 3199:
            cor = 'vermelho'
            l2.append(cor)
        else:
            cor = input()
            maxL = maxL+1
            
for color in l2:
    if color not in l3 :
        l3.append(color)
        maxL = maxL+ 1
print(len(l3), maxL)

### FIXED CODE ###

Nc = input()
N = int(Nc)
c = map(int,input().split())
cor = ''
l = list(c)
l2 = []
maxL = 0
gambiarra = 0
m = 0

for num in l:
    if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int and len(l) == N:
        if  1 <= num <= 399:
            cor = 'cinzento'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 400 <= num <= 799:
            cor = 'a'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 800 <= num <= 1199:
            cor = 'b'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 1200 <= num <= 1599:
            cor = 'c'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 1600 <= num <= 1999:
            cor = 'd'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m +1
        elif 2000 <= num <= 2399:
            cor = 'e'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 2400 <= num <= 2799:
            cor = 'f'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
                m = m + 1
        elif 2800 <= num <= 3199:
            cor = 'g'
            if cor not in l2:
                l2.append(cor)
                maxL = maxL + 1
        elif 3199 <= num <= 4800:
            maxL = maxL + 1
            cor = 'escolha'
            if cor not in l2:
                l2.append(cor)
                m = m + 1
            else:
                l2.append(cor)
                gambiarra = gambiarra + 1
            
            
           
print(m, maxL)
N,M = map(int,input().split(' '))
A = list(map(int,input().split(' ')))
l = [list(map(int,input().split())) for i in range(M)]

A.sort()
l = sorted(l,key = lambda x:x[1])

ind =0
for b,c in l[::-1]:
    mx = min(N,ind+b)
    for i in range(ind,mx):
        if c>A[i]:
            A = A[1:].append(c)
    if mx==N:
        break
    ind += b
print(sum(A))

### FIXED CODE ###

N,M = map(int,input().split(' '))
A = list(map(int,input().split(' ')))
l = [list(map(int,input().split())) for i in range(M)]

A.sort()
l = sorted(l,key = lambda x:x[1])

ind =0
for b,c in l[::-1]:
    mx = min(N,ind+b)
    for i in range(ind,mx):
        if c>A[i]:
            A[i] = c
    if mx==N:
        break
    ind += b
print(sum(A))
import sys

def insertionSort( nums, n, g ):
	cnt = 0
	i = g
	while i < n:
		v = nums[i]
		j = i - g
		while 0 <= j and v < nums[j]:
			nums[ j+g ] = nums[j]
			j -= g
			cnt += 1
		nums[ j+g ] = v
		i += 1
	return cnt
		
def shellSort( nums, n ):
	g = []
	val =0
	for i in range( n ):
		val = 3*val+1
		if  n < val:
			break
		g.append( val )
	
	g.reverse( )
	m = len( g )
	print( m )
	print( " ".join( map( str, g ) ) )
	cnt = 0
	for i in range( m ):
		cnt += insertionSort( nums, n, g[i] )
	print( cnt )
    
n = int( sys.stdin.readline( ) )
nums = []
for i in range( n ):
	nums.append( int( sys.stdin.readline( ) ) )

shellSort( nums, n )
print( "\n".join( map( str, nums ) ) )

### FIXED CODE ###

import sys
 
def insertionSort( nums, n, g ):
    cnt = 0
    i = g
    while i < n:
        v = nums[i]
        j = i - g
        while 0 <= j and v < nums[j]:
            nums[ j+g ] = nums[j]
            j -= g
            cnt += 1
        nums[ j+g ] = v
        i += 1
    return cnt
         
def shellSort( nums, n ):
    g = []
    val = 1
    while val <= n:
        g.append( val )
        val = 3*val+1
     
    g.reverse( )
    m = len( g )
    print( m )
    print( " ".join( map( str, g ) ) )
    cnt = 0
    for i in range( m ):
        cnt += insertionSort( nums, n, g[i] )
    print( cnt )
     
n = int( sys.stdin.readline( ) )
nums = []
for i in range( n ):
    nums.append( int( sys.stdin.readline( ) ) )
 
shellSort( nums, n )
print( "\n".join( map( str, nums ) ) )
Matches = {num: c for num, c in zip([1, 2, 3, 4, 5, 6, 7, 8, 9], [2, 5, 5, 4, 5, 6, 3, 7, 6])}


def solve(N, M, As):
    dp = [-1 for _ in range(N + 1)]
    dp[0] = 0
    As = sorted(As, reverse=True)
    for i in range(N + 1):
        for a in As:
            c = Matches[a]
            if dp[i - c] == -1:
                continue
            if 0 <= i - c <= N:
                dp[i] = max(dp[i],
                                dp[i-c] * 10 + a)
    return dp[N]

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    As = list(map(int, input().split(" ")))
    print(solve(N, M, As))


### FIXED CODE ###

Matches = {num: c for num, c in zip([1, 2, 3, 4, 5, 6, 7, 8, 9], [2, 5, 5, 4, 5, 6, 3, 7, 6])}


def solve(N, M, As):
    dp = [-1 for _ in range(N + 1)]
    dp[0] = 0
    for a in sorted(As, reverse=True):
        c = Matches[a]
        for i in range(N - c + 1):
            if dp[i] == -1:
                continue
            dp[i + c] = max(dp[i+c],
                            dp[i] * 10 + a)
    return dp[N]

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    As = list(map(int, input().split(" ")))
    print(solve(N, M, As))
from math import gcd

def lcm(x, y):
    return (x*y) // gcd(x, y)

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

c = B // C - A // C + (not A % C)
d = B // D - A // D + (not A % D)

x = lcm(C, D)
x = B // x - A // x + (not A % x)

print(B-A+1-c-d+x)

### FIXED CODE ###

#import math
import fractions as math

A, B, C, D = list(map(int, input().split()))
ans = []
x = int((C*D)/math.gcd(C,D))

for n in [A-1, B]:
    c = n // C
    d = n // D
    cd = n // x
    ans.append(n-c-d+cd)
print(ans[1]-ans[0])
import numpy as np

#  入力
n, k = list(map(int, input().split()))
h = list(map(int, input().split()))

#  方針
#  i番目の足場にいるという状態に対して
#  その足場に最も少ないコストを記録する．

dp = np.zeros(n)
for i in range(1, n):
    st = max(0, i - k)
    dp[i] = np.min(dp[st:i] + np.abs(h[i] - h[st:i]))

print(dp[n - 1])


### FIXED CODE ###

import numpy as np

#  入力
n, k = list(map(int, input().split()))
h = np.array(list(map(int, input().split())))

#  方針
#  i番目の足場にいるという状態に対して
#  その足場に最も少ないコストを記録する．

dp = np.zeros(n, dtype=np.int)
for i in range(1, n):
    st = max(0, i - k)
    dp[i] = np.min(dp[st:i] + np.abs(h[i] - h[st:i]))

print(dp[-1])
X = int(input())

for i in range(100):
    for j in range(100):
        if i**5-j**5==X:
            a = i
            b = j
            break
print(a,b)           

### FIXED CODE ###

X = int(input())
c = 0
for i in range(-200,200):
    for j in range(-200,200):
        if i**5-j**5==X:
            a = i
            b = j
            print(a, b)    
            c = 1
            break
    if c != 0:
        break
N = int(input())
P = list(map(int, input().split()))
cnt = 0
for i in range(N-1):
  if i+1 == P[i]:
    continue
  elif i+1 != P[i] and P[P[i]] == i+1:
    cnt = 1
  elif cnt == 0:
    print('NO')
    cnt = 2
    break
print('YES' if cnt!=2)

### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
cnt = 0
for i in range(N):
  if i+1 != P[i]:
    cnt += 1
print('NO' if cnt>2 else 'YES')
import numpy as np
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7
if N==K:
  ans0 = 1
  for a in A[0:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()
A=sorted(A)  
if (K%2==1 and A[-1]<0):
  ans1 = 1
  for a in A[N-K:N]:
    ans1 *= a
    ans1 %= MOD
  print(ans1)
  exit()

A=sorted(A, key=lambda x:abs(x), reverse=True)
AA=[np.sign(i) for i in A]

ansA = 1
for a in A[0:K]:
  ansA *= a
  ansA %= MOD
ansAA = AA[0:K].count(-1)%2
if ansA==0 or ansAA==0:
  print(ansA)
  exit()

while ansA>0:
  ansA-=MOD

B1=A[0:K]
B2=sorted(A[K:N])
Bp=[i for i in A[0:K] if i>0]
Bm=[i for i in A[0:K] if i<0]

if B2[0]>0:B2.insert(0,0)
if B2[-1]<0:B2.insert(-1,0)
if not Bp:Bp.insert(0,B1[-1])
if not Bm:Bm.insert(0,B1[0])
  
#print(Bp,Bm,B2)

B1.remove(Bp[-1])
B1.append(min(B2[0],0))
#print(B1)
ansB = 1
for a in B1[0:K]:
  ansB *= a
  ansB %= MOD

C1=A[0:K]
C1.remove(Bm[-1])
C1.append(max(B2[-1],0))

ansC = 1
for a in C1[0:K]:
  ansC *= a
  ansC %= MOD

if abs(Bp[-1]*B2[-1])-abs(Bm[0]*B2[0])==a0:
  print(ansC)
elif abs(Bp[-1]*B2[-1])-abs(Bm[0]*B2[0])>0:
  print(ansB)
else: print(ansB)

#print(max(ansB,ansC))


### FIXED CODE ###

import numpy as np
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7
if N==K:
  ans0 = 1
  for a in A[0:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()
A=sorted(A)  
if (K%2==1 and A[-1]<0):
  ans1 = 1
  for a in A[N-K:N]:
    ans1 *= a
    ans1 %= MOD
  print(ans1)
  exit()
 
A=sorted(A, key=lambda x:abs(x), reverse=True)
AA=[np.sign(i) for i in A]
 
ansA = 1
for a in A[0:K]:
  ansA *= a
  ansA %= MOD
ansAA = AA[0:K].count(-1)%2
if ansA==0 or ansAA==0:
  print(ansA)
  exit()

while ansA>0:
  ansA-=MOD

B1=A[0:K]
C1=A[0:K]
B2=sorted(A[K:N])
Bp=[i for i in A[0:K] if i>0]
Bm=[i for i in A[0:K] if i<0]
 
if B2[0]>0:B2.insert(0,0)
if B2[-1]<0:B2.insert(-1,0)
if not Bp:Bp.insert(0,B1[-1])
if not Bm:Bm.insert(0,B1[0])
  
#print(Bp,Bm,B2)
#print(Bp[-1],B2[0])
B1.remove(Bp[-1])
B1.append(min(B2[0],0))
#print(B1)
ansB = 1
for a in B1[0:K]:
  ansB *= a
  ansB %= MOD
#print(Bm[-1],B2[-1])
C1.remove(Bm[-1])
C1.append(max(B2[-1],0))
 
ansC = 1
for a in C1[0:K]:
  ansC *= a
  ansC %= MOD
#print(B1,C1)
#print(ansB,ansC)
BB1=[np.sign(i) for i in B1]
ansBB1 = BB1[0:K].count(-1)%2
BB2=[np.sign(i) for i in C1]
ansBB2 = BB2[0:K].count(-1)%2
#print(ansBB1,ansBB2)
if ansBB1==1:
  print(ansC)
  exit()
if ansBB2==1:
  print(ansB)
  exit()
#print(B2[0]/Bp[-1],B2[-1]/Bm[-1])
#print(Bp[-1]*B2[-1],Bm[0]*B2[0])

#print(abs(Bp[-1]*B2[-1])-abs(Bm[-1]*B2[0]))
#print(ansB,ansC)
if abs(Bp[-1]*B2[-1])-abs(Bm[-1]*B2[0])>=0:
  print(ansC)
else: print(ansB)
import math
n,k = map(int, input().split())

ans = 0
for i in range(n-k+1):
    ans += math.factorial(n+1)/math.factorial(k+i)/math.factorial(n+1-k-i)

print(int(ans))

### FIXED CODE ###

import math
n,k = map(int, input().split())
mod = 10**9 + 7
ans = 0

for i in range(k, n+2):
    max = (i*(n + n-i+1))//2
    min = (i*(i-1))//2
    ans += max - min + 1
    ans %= mod
    
print(ans)
n, a, b = map(int, input().split())
print(len(s))
b_cnt = 0
a_cnt = 0
for i in range(n):
    if s[i] == "a" and (a_cnt+b_cnt) < a+b:
        a_cnt += 1
        print("Yes")
    elif s[i] == "b" and (a_cnt+b_cnt) < a+b and b_cnt < b:
        b_cnt += 1
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

n, a, b = map(int, input().split())
s = input()

total_cnt = 0
b_cnt = 0
ans = ["No"]*n

for i in range(n):
    if total_cnt >= a+b:
        break
    if s[i] == "c":
        continue
    if s[i] == "a":
        total_cnt += 1
        ans[i] = "Yes"
    if s[i] == "b":
        b_cnt += 1
        if b_cnt <= b:
            total_cnt += 1
            ans[i] = "Yes"

for i in range(n):
    print(ans[i])
n = int(input())
a = input().split()

money = 1000
stock = 0
pivot = []
flag = 0

for i in range(n-1):
    pivot.append(int(a[i+1]) - int(a[i]))

pivot.append(-1)

i=0

for j in range(n):
    if(pivot[j]>0):
        i = j
        break
    else:
        flag = -1

if(flag != -1):
    stock = int(money//int(a[i]))
    money = int(money%int(a[i]))

i+=1
if(flag != -1):
    while(i<n):
        if(i==n-1):
            if(pivot[i-1]>0):
                money = money + stock*int(a[i])
                stock = 0
            break

        if(pivot[i]<0):
            while(pivot[i+1]<=0):
                i+=1
            stock = int(money//int(a[i]))
            money = int(money%int(a[i]))
            i+=1
        else:
            while(pivot[i+1]>=0):
                i+=1
            money = money + stock*int(a[i+1])
            stock = 0
            i+=1

print(money)


### FIXED CODE ###

n = int(input())
a = input().split()

money = 1000
stock = 0
pivot = []
upflag = 0
dnflag = 1

if(int(a[1]) - int(a[0]) > 0): # initial
    stock = int(money // (int(a[0])))
    money = int(money % (int(a[0])))
    upflag = 1
    dnflag = 0

for i in range(n-2): # i=0,1,,,,n-3 (for n=7, n-3=4)
    if(int(a[i+1]) == int(a[i])):
        if((int(a[i+2]) - int(a[i+1]) < 0) and upflag == 1): # i+1 is local max so that to sell stock
            money = money + stock * (int(a[i+1]))
            stock = 0
            upflag = 1
            dnflag = 0
        elif((int(a[i+2]) - int(a[i+1]) > 0) and dnflag == 1): # i+1 is local min so that to sell stock
            stock = int(money // (int(a[i+1])))
            money = int(money % (int(a[i+1])))
            upflag = 0
            dnflag = 1

    elif(int(a[i+1]) - int(a[i]) > 0):
        upflag = 1
        if(int(a[i+2]) - int(a[i+1]) < 0): # i+1 is local max so that to sell stock
            money = money + stock * (int(a[i+1]))
            stock = 0
            upflag = 0

    elif(int(a[i+1]) - int(a[i]) < 0):
        dnflag = 1
        if(int(a[i+2]) - int(a[i+1]) > 0): # i+1 is local min so that to buy stock
            stock = int(money // (int(a[i+1])))
            money = int(money % (int(a[i+1])))
            dnflag = 0

if(int(a[n-1]) - int(a[n-2]) > 0): # sell @ final
    money = money + stock * (int(a[n-1]))
elif(int(a[n-1]) - int(a[n-2]) == 0):
    if(upflag == 1):
        money = money + stock * (int(a[n-1]))

print(money)
N, M=map(int, input().split())

A=[]
B=[]
C=[]
for i in range(N):
  a, b=map(int, input().split())
  c=list(map(int, input().split()))
  A.append(a)
  B.append(b)
  C.append(c)
  
print(A, B, C)

### FIXED CODE ###

n,m = map(int,input().split())
dp = [0]+[10**8+10]*(2**n-1)
for i in range(m):
  a,b = map(int,input().split())
  s = sum([2**(x-1) for x in list(map(int,input().split()))])
  for j in range(2**n):
    dp[j|s] = min(dp[j|s],dp[j]+a)
if dp[-1] <= 10**8:
  print(dp[-1])
else:
  print(-1)
N,K,C=map(int,input().split())
S=list(input())

#まず一つ答えをつくる これはたぶん貪欲でいける
days=[]
T=S.copy()
for i in range(N):
    if T[i]=='o':
        days.append(i)
        if C!=0:
            for j in range(1,C+1):
                if i+j>=N:
                    break
                T[i+j]='x'
    if len(days)>=K:
        break

def check(plan):
    cnt=0
    qlan=plan.copy()
    for i in range(N):
        if qlan[i]=='o':
            cnt+=1
            if C!=0:
                for j in range(1,C+1):
                    if i+j>=N:
                        break
                    qlan[i+j]='x'
        if cnt>=K:
            return True  #これなしでも成立する
            break
    return False  #これなしでは成立しない

for i in days:
    p=S
    p[i]='x'
    if not check(p):
        print(i+1)
    p[i]='o'


### FIXED CODE ###

N,K,C=map(int,input().split())
S=input()

maekara=[]
i=1
cnt=0
while i<=N and cnt<K:
    if S[i-1]=='o':
        maekara.append(i)
        i+=C+1
        cnt+=1
    else: i+=1

usirokara=[]
j=N
cnt=0
while j>=1 and cnt<K:
    if S[j-1]=='o':
        usirokara.append(j)
        j-=C+1
        cnt+=1
    else: j-=1
usirokara=usirokara[::-1]

for i in range(K):
    if maekara[i]==usirokara[i]:
        print(maekara[i])
A,B,K=map(int,input().split())
count=0
i=min(A,B)
while count<K:
    i-=1
    if A%i==0 and B%i==0:
        count+=1
print(i)

### FIXED CODE ###

A,B,K=map(int,input().split())
count=0
for i in range(max(A,B),0,-1):
    if A%i==0 and B%i==0:
        count+=1
        if count==K:
            print(i)
string = input()

char = ["A", "C", "G", "T"]

count = 0
lengths = []
for s in string:
    if s in char:
        count += 1
    else:
        lengths.append(count)
        count = 0
else:
    print(max(lengths))


### FIXED CODE ###

s = input()
n = len(s)

ans = 0
for i in range(n):
    for j in range(i, n):
        if all("ACGT".count(l) for l in s[i:j + 1]):
            ans = max(ans, j - i + 1)

print(ans)
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

N,K,Q = LI()
A = [0 for i in range(Q)]
for i in range(Q):
    A[i] = int(input()) - 1

cnt = {}

for i in range(N):
    cnt[i] = 0

for a in A:
    cnt[a] += 1

for i in range(N):
    if K - Q + cnt[i] > 0:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

S = str(input())
weather = ["Sunny","Cloudy","Rainy"]
print(weather[(weather.index(S)+1) % len(weather)])
import math
A, B = [int(x) for x in input().split()]
lcm = (A * B) // math.gcd(A, B)
print(lcm)

### FIXED CODE ###

import fractions
A, B = [int(x) for x in input().split()]
lcm = (A * B) // fractions.gcd(A, B)
print(lcm)