Harryxun/stf_run huggingface dataset:
import math
from functools import lru_cache
mod = 10 ** 9 + 7
N, K = map(int, input().split())
graph = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)

@lru_cache(maxsize=10**11)
def fact(x):
    return math.factorial(x)

@lru_cache(maxsize=10**11)
def permutation_count(n, r):
    return fact(n) // fact(n-r)

stack = []
for v in graph[0]:
    stack.append((v, 0))
ans = K * permutation_count(K-1, len(graph[0]))
while stack:
    v, parent = stack.pop()
    ans *= permutation_count(K-2, len(graph[v])-1)
    ans %= mod
    for child in graph[v]:
        if child == parent:
            continue
        stack.append((child, v))

print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
graph = [[] for i in range(N)]

for i in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)

stack = [0]
ans = K
mod = 10**9+7
r = [True] * N
r[0] = False
while stack:
    v = stack.pop()
    tmp = K - 1
    if v > 0:
        tmp -= 1
    for child in graph[v]:
        if r[child]:
            r[child] = False
            stack.append(child)
            ans *= tmp
            tmp -= 1
            ans %= mod
print(ans)
s = int(input())
l = 10**9+7
list_1 = [0, 1, 1, 1]
list_2 = [0, 1, 2]
for i in range(3, s):
  list_2.append((list_2[i-1] + list_1[i])%l)
  list_1.append(list_2[i-2])
if s = 1 or s = 2:
  print(0)
else:
  print(list_1[s-1])

### FIXED CODE ###

c = int(input())
if c == 0:
  print(1)
else:
  print(0)
n=int(input())

arr = [[0 for i in range(n)] for j in range(n)]

#print(arr)

for i in range(0,n):
    l=raw_input().split()
    if(int(l[1])>=1):
        x=int(l[0])
        y=int(l[1])
        p=len(l)
        d=0
        while(2+d<p):
            z=int(l[2+d])
            #print(x,y,z)
            arr[x-1][z-1]=1
            #print(arr)
            d=d+1

print(arr)


### FIXED CODE ###


n=int(input())

arr = [[0 for i in range(n)] for j in range(n)]
#for i in arr:
    #print(' '.join(map(str, i)))

#print(arr)

for i in range(0,n):
    l=raw_input().split()
    if(int(l[1])>=1):
        x=int(l[0])
        y=int(l[1])
        p=len(l)
        d=0
        while(2+d<p):
            z=int(l[2+d])
            #print(x,y,z)
            arr[x-1][z-1]=1
            #print(arr)
            d=d+1

#print(arr)
for i in arr:
    print(' '.join(map(str, i)))
input()
A = list(map(int,input(),split()))
count=0
while all(a%2==0for a in A):
  A = [a/2 for a in A]
  count +=1
print(count)



### FIXED CODE ###

input()
A=list(map(int,input().split()))
count=0
while all(a%2==0 for a in A):
  A=[a/2 for a in A]
  count +=1
print(count)
s=list(input()).sort();a=s.index('1');print(2*min(a,len(s)-a))

### FIXED CODE ###

s=sorted(list(input()))
if s[0]==s[-1]:
  print(0)
else:
  a=s.index('1')
  print(2*min(a,len(s)-a))
n,k = map(int, input().split())
def sa(x):
    if x < 0:
        return abs(x)
    return abs(sa(x-k)-k)
print(sa(n))

### FIXED CODE ###

x,y,z = map(str, input().split())
print( z + " " + x + " " + y)
n,m=list(map(int,input().split(" ")))
a=[]
for i in range(m):
  a.append(int(input()))
dp=[float("inf") for i in range(n)]
dp[0]=0
if 1 in a:
  dp[1]=0
else:
  dp[1]=1
for i in range(2,n):
  if (i-1 not in a)and(i-2 not in a):
    dp[i]=dp[i-1]+dp[i-2]
  elif (i-1 not in a)and(i-2 in a):
    dp[i]=dp[i-1]
  elif (i-1 in a)and(i-2 not in a):
    dp[i]=dp[i-2]
  else:
    dp[i]=0
print(n)

### FIXED CODE ###

n,m=list(map(int,input().split(" ")))
a=[]
dp=[float("inf") for i in range(n+1)]
for i in range(m):
  a=int(input())
  dp[a]=0
dp[0]=1
if dp[1] != 0:
  dp[1]=1
for i in range(2,n+1):
  if dp[i]!=0:
    dp[i]=dp[i-1]+dp[i-2]
print(dp[n]%1000000007)
print(3*(int(input()**2)))

### FIXED CODE ###

print(3*(int(input()) ** 2))
from math import inf
A,B,C,D = map(int, input().split())
for i in range(inf):
    if i % 2 == 0:
        D -= A
        if D == 0:
            print('Yes')
            break
    else:
        B -= C
        if B == 0:
            print('No')
            break

### FIXED CODE ###

from math import ceil

h_t,s_t,h_a,s_a = list(map(int, input().split()))

bearable_t = ceil(h_t/s_a)
bearable_a = ceil(h_a/s_t)

print('Yes' if bearable_t >= bearable_a else 'No')
import math
import collections
def calc_combi2(n):
    if n<=1:
        return 0
    return math.factorial(n)/(math.factorial(n-2)*math.factorial(2))
n=int(input())
data=list(map(int,input().split()))
data_cnt=collections.Counter(data)
ans=[0]*n
count=0
for i in data_cnt.values():
    count+=calc_combi2(i)
for a,b in data_cnt.items():
    ans[a]=int(count-b+1)
for i in data:
    print(ans[i])

### FIXED CODE ###

import math
import collections
def calc_combi2(n):
    if n<=1:
        return 0
    return math.factorial(n)/(math.factorial(n-2)*math.factorial(2))
n=int(input())
data=list(map(int,input().split()))
data_cnt=collections.Counter(data)
count=0
for i in data_cnt.values():
    count+=calc_combi2(i)
for i in data:
    ans=count-data_cnt[i]+1
    print(int(ans))
s = input()
Q = int(input())
for i in range(Q):
    q = list(map(str, input().split())
    if q[0] == "1":
        if len(s) > 1:
            s = s[-1] + s[1:-1] + s[0]
    else:
        if q[1] == "1":
            s = q[2] + s 
        else:
            s = s + q[2]
print(s)

### FIXED CODE ###

s = str(input())
Q = int(input())
forward = 1
front = ""
back = ""

for i in range(Q):
    q = list(input().split())
    if q[0] == "1":
        forward *= -1
    else:
        if q[1] == "1":
            if forward == 1:
                front = q[2] + front
            else:
                back = back + q[2]        
        else:
            if forward == 1:
                back = back + q[2]
            else:
                front = q[2] + front

s = front + s + back
if forward == -1:
    s = s[::-1]
print(s)
N = int(input())

l = []
l1 = []
for i in range(1, N + 1):
    l.append(i)
for i in range(2, N + 1):
    l1.append(i)
l1.append(1)

m = []
for i in range(len(l)):
    m.append(l[i] % l1[i])
pirnt(sum(m))

### FIXED CODE ###

N = int(input())
ans = ((N - 1) * N ) // 2
print(ans)
import heapq

N,K = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)

MOD=10**9+7

ans=1
if L[-1]<=0:#全部負
    if K%2==1:
        #小さい方からKこ
        for l in L[-K:]:
            ans*=l
            ans%=MOD
    else:
        #大きい方からKこ
        for l in L[:K]:
            ans*=l
elif L[0]>=0:#全部生
    for l in L[-K:]:
        ans*=l
        ans%=MOD
else:#生徒ふが入り混じり
    cand=[]
    if K%2==1:#奇数個
        K-=1
        cand.append(L[-1])
        L=L[:-1]
    #N-1こ(偶数を選んでから)追加で、正の(一番大きいやつを取っておく?)怪しい
    poss=[]
    negs=[]
    replace=[]
    for l in L:
        if l<0:
            heapq.heappush(poss,l)
            if len(poss)>K:
                heapq.heappop(poss)#正の数でK番目より小さいやつは捨てる
        else:
            heapq.heappush(negs,l)
    while len(negs)>=2:
        a = heapq.heappop(negs)
        b = heapq.heappop(negs)
        replace.append(a*b)

    assert 1==2
    #posとnegから選んでいく

print(ans)



### FIXED CODE ###

N,K = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)

MOD=10**9+7

ans=1
if N==K:
    for a in L:
        ans*=a
        ans%=MOD

#全部ふで奇数個
elif all(l<0 for l in L) and K%2==1:
    #小さい方からKこ
    for l in L[-K:]:
        ans*=l
        ans%=MOD
else:#生徒ふが入り混じり
    absL = sorted(L,key=lambda x:-abs(x))

    ans_cand=[v for v in absL[:K]]
    remain=[v for v in absL[K:]]

    if len(list(filter(lambda x:x<0,ans_cand)))%2==0:
        for a in ans_cand:
            ans*=a
            ans%=MOD
    else:
        ans_cand_min_neg = None
        ans_cand_min_pos=None
        remain_cand_max_neg=None
        remain_cand_max_pos=None

        for a in ans_cand:
            if a<0:
                ans_cand_min_neg=a

        #できるだけ絶対値が大きいやつ
        for a in remain:
            if a>=0:
                remain_cand_max_pos=a
                break

        #正の数をans_candから一つ取り除いき、remain_candから負の数を一つ取ってくる

        for a in ans_cand:
            if a>0:
                ans_cand_min_pos=a
        for a in remain:
            if a<=0:
                remain_cand_max_neg=a
                break

        NG=None
        if not None in {ans_cand_min_pos,ans_cand_min_neg,remain_cand_max_neg,remain_cand_max_pos}:
            A = abs(ans_cand_min_pos*remain_cand_max_pos)
            B = abs(ans_cand_min_neg*remain_cand_max_neg)
            if A>=B:
                ans_cand.append(remain_cand_max_pos)
                NG=ans_cand_min_neg
            else:
                ans_cand.append(remain_cand_max_neg)
                NG=ans_cand_min_pos
        elif not None in {ans_cand_min_pos,remain_cand_max_neg}:
            ans_cand.append(remain_cand_max_neg)
            NG=ans_cand_min_pos
        elif not None in {ans_cand_min_neg,remain_cand_max_pos}:
            ans_cand.append(remain_cand_max_pos)
            NG=ans_cand_min_neg


        for a in ans_cand:
            if a!=NG:
                ans*=a
                ans%=MOD
            else:
                NG=None
print(ans)
n, m = map(int,input().split())
sc = [list(map(int,input().split())) for _ in range(m)]

sc.sort(key=lambda x: x[0],reverse=True)
n = len(sc)
for i in range(1,1000):
    i = str(i)
    if len(i) < sc[0][0]:
        continue
    c = n
    for j in range(m):
        if i[sc[j][0]-1] == str(sc[j][1]):
            c -= 1
    if c == 0:
        print(i)
        quit()

print(-1)

### FIXED CODE ###

n, m = map(int,input().split())
sc = [list(map(int,input().split())) for _ in range(m)]

for i in range(10**n):
    i = str(i)
    flag = True
    if len(i) == n:
        for j in range(m):
            if i[sc[j][0]-1] != str(sc[j][1]):
                flag = False
        if flag:
            print(i)
            quit()

print(-1)
X, N = map(int, input().split())
P = sorted(list(map(int, input().split())))

c = 100
for x in range(1, 101):
    if x in P:
        continue
    else:
        tmp = abs(X-x)
        if tmp < c:
            c = tmp
            ans = x
print(ans)

### FIXED CODE ###

X, N = map(int, input().split())
if N >= 1:
    P = sorted(list(map(int, input().split())))
else:
    P = []

c = 200
for x in range(-1, 102):
    if x in P:
        continue
    else:
        tmp = abs(X-x)
        if tmp < c:
            c = tmp
            ans = x
print(ans)
import sys

args = [input() for i in range(6)]

loops1 = 4
loops2 = 5
arg1 = 0
arg2 = 1

for i in range(arg1,loops1):
	for j in range(arg2,loops2):
		if (args[j] - args[i]) > args[5]:
			print(":(")
			sys.exit()
print("Yay!")
	             

### FIXED CODE ###

import sys

loops1 = 4
loops2 = 5
arg1 = 0
arg2 = 1

i=0
j=0

args = [int(input()) for i in range(6)]

for i in range(arg1,loops1):
	for j in range(arg2,loops2):
		if (args[j] - args[i]) > args[5]:
			print(":(")
			sys.exit()
print("Yay!")
import math
n,k=map(int,input().split())
a=sorted(list(map(int,input().split())))
b=[0]*n
if k>max(a):
    print("IMPOSSIBLE")
    exit()
g=a[0]
for i in range(1,n):
    g=math.gcd(g,a[i])
for i in range(n):
    b[i]=a[i]%g
if k%g in b:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

import fractions
n,k=map(int,input().split())
a=sorted(list(map(int,input().split())))
b=[0]*n
if k>max(a):
    print("IMPOSSIBLE")
    exit()
g=a[0]
for i in range(1,n):
    g=fractions.gcd(g,a[i])
for i in range(n):
    b[i]=a[i]%g
if k%g in b:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
N,M=map(int,input().split())

G=[[] for _ in range(N)]
for _ in  range(M):
    xi,yi=map(int,input().split())
    G[xi-1].appedn(yi-1)

dp=[-1]*N #各ノードを始点とした時の最長経路

def rec(v):
    if dp[v]!=-1:
        return dp[v]
    
    res=0

    for nv in G[v]:
        res=max(res,rec(nv)+1)
    
    dp[v]=res
    return res

ans=0
for v in range(N):
    ans=max(ans,rec(v))
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5+100)

N,M=map(int,input().split())
G=[[] for _ in range(N)]
for _ in  range(M):
    xi,yi=map(int,input().split())
    G[xi-1].append(yi-1)

dp=[-1]*N #各ノードを始点とした時の最長経路

def rec(v):
    if dp[v]!=-1:
        return dp[v]
    
    res=0

    for nv in G[v]:
        res=max(res,rec(nv)+1)
    
    dp[v]=res
    return res

ans=0
for v in range(N):
    ans=max(ans,rec(v))
print(ans)
n = int(input())
x = list(map(int, input().split()))
d = [x[i+1] - x[i] for i in range(n - 1)]
 
def fact(m):
  return m * fact(m-1) if m != 1 else 1 

fact_n_1 = fact(n-1)

e = {}
for i in range(n-1):
  if i == 0:
    e[i] = fact_n_1
  else:
    e[i] = e[i - 1] + fact_n_1 // (i + 1)

print(sum(e[i] * d_i % 1000000007
          for i, d_i 
          in enumerate(d)) % 1000000007 ) 

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

n = int(input())
x = list(map(int, input().split()))
d = [x[i+1] - x[i] for i in range(n - 1)]

def pow(x, y):
    if y == 0:
        return 1
    ans = 1
    while y > 1:
        if y % 2 != 0:
            ans *= x
            ans %= 1000000007
        x *= x
        x %= 1000000007
        y //= 2
    return ans * x % 1000000007

def fact(m):
  return m * fact(m-1) % 1000000007 if m != 1 else 1
 
fact_n_1 = fact(n-1)

e = [None] * (n-1)
for i in range(n-1):
  if i == 0:
    e[i] = fact_n_1
  else:
    e[i] = (e[i - 1] + fact_n_1 * pow(i + 1, 1000000005)) % 1000000007

print(sum(e_i * d_i % 1000000007
          for i, (d_i, e_i) 
          in enumerate(zip(d, e))) % 1000000007 )
n = int(input())
s = input()

count=0
for i in range(n-2):
  if s[i] = "A":
    if s[i+1] = "B":
      if s[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':
        if s[i + 1] == 'B':
            if s[i + 2] == 'C':
                count += 1
print(count)
from sys import stdin

ntree = []
ans = []


def culceach(n, sum):
    ans[n-1] += sum
    for i in range(len(ntree[n-1])):
        culceach(ntree[n-1][i], ans[n-1])

def addnum(p, x):
    ans[p-1] += x

#    for i in range(len(ntree[p-1])):
#        addnum(ntree[p-1][i], x)

n, q = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(n):
    ntree.append([])
    ans.append(0)

for i in range(n-1):
  a, b = [int(x) for x in stdin.readline().rstrip().split()]
  ntree[a-1].append(b)

for i in range(q):
  p, x = [int(x) for x in stdin.readline().rstrip().split()]
  addnum(p,x)

culceach(1, 0)

print(' '.join([str(n) for n in ans]))


### FIXED CODE ###

from sys import stdin

ntree = []
ans = []


n, q = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(n):
    ntree.append([])
    ans.append(0)

for i in range(n-1):
  a, b = [int(x) for x in stdin.readline().rstrip().split()]
  ntree[a-1].append(b)

for i in range(q):
  p, x = [int(x) for x in stdin.readline().rstrip().split()]
  ans[p-1] += x

for i in range(n):
    for j in range(len(ntree[i])):
       ans[ntree[i][j]-1] += ans[i]

print(' '.join([str(n) for n in ans]))
b=｛25:"Christmas",24:"Christmas Eve",23:"Christmas Eve Eve",22:"Christmas Eve Eve Eve"｝
print(b[int(input())]

### FIXED CODE ###

b={25:"Christmas",24:"Christmas Eve",23:"Christmas Eve Eve",22:"Christmas Eve Eve Eve"}
print(b[int(input())])
l = map(int, raw_input().split())
S = l[0] * l[1]
L = 2 * (l[0] + l[1])

print(S, L)


### FIXED CODE ###

l = input().split()
a, b = int(l[0]), int(l[1])
print(a * b, 2 * (a + b))
n = raw_input()
mat =[ map(int,raw_input()) for i in range(2)]
def f(mat,i,j):
	if i<0 or j <0:
		return -float('inf')
	return mat[i][j] + max(f(mat,i-1,j),f(mat,i,j-1))
print f(mat,1,len(mat[0])-1)

### FIXED CODE ###

n,mat = raw_input(),[ map(int,raw_input().split()) for i in range(2)]
def f(mat,i,j):
	if i<0 or j <0:
		return -float('inf')
	if i == 0 and j == 0:
		return mat[i][j] 
	return mat[i][j] + max(f(mat,i-1,j),f(mat,i,j-1))
print f(mat,1,len(mat[0])-1)
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from itertools import combinations # (string,3) 3回
#from collections import deque
#import collections.defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    LIST = [0] * 100000
    for i in range(n):
        l,r = readInts()
        l -=1
        # いもす法
        LIST[l] +=1
        LIST[r] -=1
    # 累積和
    for i in range(1,100000):
        LIST[i] += LIST[i-1]
    cnt = 0
    for i in range(100000):
        if LIST[i] > 0:
            cnt += 1
    #print(LIST)
    print(cnt)
if __name__ == '__main__':
  main()


### FIXED CODE ###

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from itertools import combinations # (string,3) 3回
#from collections import deque
#import collections.defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    LIST = [0] * 100001
    for i in range(n):
        l,r = readInts()
        l -=1
        # いもす法
        LIST[l] +=1
        LIST[r] -=1
    # 累積和
    for i in range(1,100001):
        LIST[i] += LIST[i-1]
    cnt = 0
    for i in range(100001):
        if LIST[i] > 0:
            cnt += 1
    #print(LIST)
    print(cnt)
if __name__ == '__main__':
  main()
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max([0,n.count(l[i])-m.count(l[i]) for i in range(len(l))]))

### FIXED CODE ###

n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
from collections import defaultdict
import sys
# input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])


new_list = []
for k, v in new_dict:
    new_list += [k] * v
    if len(new_list) >= N:
        break
new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))


### FIXED CODE ###

from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])

new_list = []
for k, v in new_dict:
    if v > N:
        v = N
    new_list += [k] * v
    if len(new_list) >= N:
        break

new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))
a,b =map(int, input().split())
r = 0
for _ in range(2):
    if(a>b):
        r+=a
        a-=1
    else:
        r+=b
        b-=1
print(r)


### FIXED CODE ###

K = int(input())
print((K//2)*(K//2 + K%2))
import sys
input = lambda: sys.stdin.readline().rstrip()
from itertools import accumulate


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

S = input()

if len(S) == 1:
    print(1)
    exit()

cum_sum = [0]

tmp_S = S

if S[-1] == '0':
    tmp_S += '1'
else:
    tmp_S += '0'

cnt = 1
for i in range(len(tmp_S)-1):
    if tmp_S[i] == tmp_S[i+1]:
        cnt += 1
    else:
        cum_sum.append(cnt)
        cnt = 1

print(*cum_sum)
cum_sum = list(accumulate(cum_sum))
print(*cum_sum)

ans = 0
ran = K+K
if S[0] == '0':
    for i in range(0, len(cum_sum), 2):
        if i+ran < len(cum_sum):
            ans = max(ans, cum_sum[i+ran] - cum_sum[i])
else:
    for i in range(0, len(cum_sum), 2):
        if i+ran < len(cum_sum):
            ans = max(ans, cum_sum[i+ran+1] - cum_sum[i])

print(ans)











### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip()
from itertools import accumulate

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

S = input()


num = []

if S[0] == '0':
    num.append(0)

if S[-1] == '1':
    S += '0'
else:
    S += '1'    

cnt = 1
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        num.append(cnt)
        cnt = 1 
if S[-2] == '0':
    num.append(0)

num = [0] + num
cum_sum = list(accumulate(num))

ans = 0

for i in range(0, len(cum_sum), 2):
    right = i + K * 2 + 1
    if i + K * 2 >= len(cum_sum): 
        right = len(cum_sum) - 1

    ans = max(ans, cum_sum[right] - cum_sum[i])
print(ans)
n, m = map(int, input().split())
Hs = input().split()
Hs = [int(ele) for ele in Hs]

import numpy as np

gra = np.zeros(shape=(n, n))

for i in range(m):
    con = input().split()
    con = [int(ele) for ele in con]
    con.sort()
    id1 = con[0] - 1
    id2 = con[1] - 1
    
    if Hs[id2] == Hs[id1]:
        gra[id1, id2] = 100
        gra[id2, id1] = 100
    else:    
        gra[id1, id2] = Hs[id2] - Hs[id1]
        gra[id2, id1] = Hs[id1] - Hs[id2]

res = np.all(gra <= 0, axis=1)

print(sum(res))

### FIXED CODE ###

n, m = map(int, input().split())
Hs = input().split()
Hs = [int(ele) for ele in Hs]

res = [1 for i in range(n) ]
for i in range(m):
    con = input().split()
    con = [int(ele) for ele in con]
    
    id1 = con[0] - 1
    id2 = con[1] - 1
    
    if res[id1] == 1:
        res[id1] = int(Hs[id2] < Hs[id1])
    if res[id2] ==1:
        res[id2] = int(Hs[id1] < Hs[id2])

print(sum(res))
r, D, X_1 = input().split()
r = int(r)
D = int(D)
x = int(X_1)
for i in range(10):
  print(str(x))
  x = r * X - D

### FIXED CODE ###

r, D, X_1 = input().split()
r = int(r)
D = int(D)
x = int(X_1)
for i in range(10):
  x = r * x - D
  print(str(x))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M, *UV, S, T = map(int, read().split())

it = iter(UV)
G = [[] for _ in range(1+N+N+N)]
for x, y = in zip(it, it):
    x1 = x + N; x2 = x1 + N;
    y1 = y + N; y2 = y1 + N;
    G[x].append(y1)
    G[x1].append(y2)
    G[x2].append(y)

INF = 10 ** 15
dist = [INF] * (N + N + N + 1)
dist[S] = 0
q = [S]
while q:
    qq = []
    for x in q:
        for y in G[x]:
            if dist[y] != INF:
                continue
            qq.append(y)
            dist[y] = dist[x] + 1
            if y == T:
                break
    q = qq

d = dist[T]

answer = -1 if d == INF else d//3
print(answer)



### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,*UV,S,T = map(int,read().split())

it = iter(UV)
G = [[] for _ in range(1+N+N+N)]
for x, y in zip(it, it):
    x1=x+N; x2=x1+N;
    y1=y+N; y2=y1+N;
    G[x].append(y1)
    G[x1].append(y2)
    G[x2].append(y)

INF = 10 ** 15
dist = [INF] * (N+N+N+1)
dist[S] = 0
q = [S]
while q:
    qq = []
    for x in q:
        for y in G[x]:
            if dist[y] != INF:
                continue
            qq.append(y)
            dist[y] = dist[x] + 1
            if y == T:
                break
    q = qq

d = dist[T]

answer = -1 if d == INF else d//3
print(answer)
import math
import functools

n, x = map(int, input().split())
xlist = list(map(int, input().split()))
for i in range(n):
    xlist[i] = abs(xlist[i]-x)
    
gcd = functools.reduce(math.gcd, xlist)
    
print(gcd)

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)

n, x = map(int, input().split())
xlist = list(map(int, input().split()))
for i in range(n):
    xlist[i] = abs(xlist[i]-x)
    
if len(xlist)==1:
    print(xlist[0])
else:
    maxgcd = gcd(xlist[0], xlist[1])
    for i in range(2,n):
        maxgcd = gcd(maxgcd, xlist[i])
    print(maxgcd)
N = int(input())
A = map(int,input().split())
print('{:.16g}'.format(1 / sum(1 /x for x in A)))

### FIXED CODE ###

a=int(input())
s=input()
print(s if a >=3200 else 'red')