Harryxun/stf_run huggingface dataset:
N, A, B, C = map(int, input().split())
S = [input() for _ in range(N)]

A, B, C = min(A, 2), min(B, 2), min(C, 2)
X = [0, A, B, C]  # 1-indexecの方が楽そう
F = {1: 'A', 2: 'B', 3: 'C'}

ans = []
for k, s in enumerate(S):
    if s == 'AB':
        i, j = 1, 2
    elif s == 'BC':
        i, j = 2, 3
    elif s == 'AC':
        i, j = 1, 3

    if X[i] > X[j]:
        X[i] -= 1
        X[j] += 1
        ans.append(j)

    elif X[i] < X[j]:
        X[i] += 1
        X[j] -= 1
        ans.append(i)

    else:
        if (X[i] == X[j] == 1) and (k < N):
            if ((S[k + 1][0] == F[i]) and (S[k + 1][1] == F[i ^ j])) or ((S[k + 1][0] == F[i ^ j]) and (S[k + 1][1] == F[i])):
                X[i] += 1
                X[j] -= 1
                ans.append(i)
            else:
                X[j] += 1
                X[i] -= 1
                ans.append(j)
        else:
            X[i] -= 1
            X[j] += 1
            ans.append(j)

    if any([x < 0 for x in X]):
        print('No')
        exit()

print('Yes')
for a in ans:
    print(F[a])


### FIXED CODE ###

N, A, B, C = map(int, input().split())
S = [input() for _ in range(N)]

A, B, C = min(A, 2), min(B, 2), min(C, 2)
X = [0, A, B, C]  # 1-indexecの方が楽そう
F = {1: 'A', 2: 'B', 3: 'C'}

ans = []
for k, s in enumerate(S):
    if s == 'AB':
        i, j = 1, 2
    elif s == 'BC':
        i, j = 2, 3
    elif s == 'AC':
        i, j = 1, 3

    if X[i] > X[j]:
        X[i] -= 1
        X[j] += 1
        ans.append(j)

    elif X[i] < X[j]:
        X[i] += 1
        X[j] -= 1
        ans.append(i)

    else:
        if (X[i] == X[j] == 1) and (k < N - 1):
            if ((S[k + 1][0] == F[i]) and (S[k + 1][1] == F[i ^ j])) or ((S[k + 1][0] == F[i ^ j]) and (S[k + 1][1] == F[i])):
                X[i] += 1
                X[j] -= 1
                ans.append(i)
            else:
                X[j] += 1
                X[i] -= 1
                ans.append(j)
        else:
            X[i] -= 1
            X[j] += 1
            ans.append(j)

    if any([x < 0 for x in X]):
        print('No')
        exit()

print('Yes')
for a in ans:
    print(F[a])
N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
if cage==None:
  print("TLE")
else:
  print(soted(cage)[0])

### FIXED CODE ###

N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
      cage.append(c)
if len(cage)==0:
  print("TLE")
else:
  print(min(cage))
N,M=map(int,input().split())
L=[0]*N
A=0
W=0
tmp=[0]*M
for i in range(M):
	x,y=input().split()
	t=int(x)
	if L[t-1]==0:
		if y=="WA":
			tmp[t-1]+=1
		else:
			A+=1
			W+=tmp[t-1]
			L[t-1]=1
print(A,W)

### FIXED CODE ###

from collections import defaultdict

N,M=map(int,input().split())
P=[]
S=[]
for i in range (M):
	A,B=input().split()
	P.append(int(A))
	S.append(B)
Q=defaultdict(lambda:0)
R=defaultdict(lambda:0)
count=0
for i,j in zip(P,S):
  if Q[i]==0:
    if j=="AC":
      Q[i]=1
      count+=R[i]
    elif j=="WA":
      R[i]+=1
print(sum(Q.values()),count)
a, b, c = map(int, input().split())
K = int(input())

testA = 0
if testA < a:
    testA = a
if testA < b:
    testA = b
if testA < c:
    testA = c
  
ans = a + b + c + testA * (K-1)
print(ans)

### FIXED CODE ###

a, b = (int(i) for i in input().split())

if b < a:
    ans = a - 1
else:
    ans = a

print(ans)
import math
r = int(input())
S = math.pi * r * r
R = 2 * math.pi * r
print("{0} {1}".format(S, R))

### FIXED CODE ###

from math import pi
r = float(input())
S = pi * r * r
R = 2 * pi * r
print("{0} {1}".format(S, R))
N, M = map(int, input().split())

c = 0
c += N(N-2)/2
c += M(M-2)/2

print(c)

### FIXED CODE ###

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

c = 0
c += (N*(N-1))/2
c += (M*(M-1))/2

print(int(c))
w,h,x,y,r = map(int, raw_input().split())

if 0 <= x - r and x + r <= w and 0 <= y - r and y + r <= h:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

w,h,x,y,r = map(int, input().split())
               
if 0 <= x - r and x + r <= w and 0 <= y - r and y + r <= h:
    print('Yes')
else:
    print('No')
a=list(int(input))
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1
  

### FIXED CODE ###

a=list(input())
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1
N, M = map(int, input().split())
H = list(map(int, input().split()))
a = list(range(1,N+1))
for i in range(M):
  ai, bi = map(int, input().split())
  if H[ai+1] < H[bi+1] :
    a.remove(ai)
  else:
    a.remove(bi)
print(len(a))    
  

### FIXED CODE ###

N, M = map(int, input().split())
H = list(map(int, input().split()))
a = [True] * N
for i in range(M):
  ai, bi = map(int, input().split())
  if H[ai-1] <= H[bi-1] :
    a[ai-1] = False
  if H[ai-1] >= H[bi-1]:
    a[bi-1] = False
print(sum(a))
import bisect
import sys
from collections import defaultdict
N,M=map(int,input().split())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
dd=defaultdict(int)
for a in A:
    dd[a]+=1
for b in B:
    dd[b]+=1
for d,n in dd.items():
    if n>=3:
        print(0)
        sys.exit()
A=sorted(A)
B=sorted(B)
ans=1
mod=10**9+7
for i in range(N*M,0,-1):
    x=bisect.bisect_left(A,i)
    y=bisect.bisect_left(B,i)
    if A[x]==i and B[y]==i:
        #print(i)
        continue
    elif A[x]==i:
        ans*=(M-y)
        ans%=mod
    elif B[y]==i:
        ans*=(N-x)
        ans%=mod
    else:
        ans*=((N-x)*(M-y)-(N*M-i))
        ans%=mod
    #print(x,y,i,ans)
print(ans)

### FIXED CODE ###

import bisect
import sys
from collections import defaultdict
N,M=map(int,input().split())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
dd=defaultdict(int)
for a in A:
    dd[a]+=1
for b in B:
    dd[b]+=1
for d,n in dd.items():
    if n>=3:
        print(0)
        sys.exit()
A=sorted(A)
B=sorted(B)
ans=1
mod=10**9+7
for i in range(N*M,0,-1):
    x=bisect.bisect_left(A,i)
    y=bisect.bisect_left(B,i)
    if x>=N or y>=M:
        print(0)
        sys.exit()
    if A[x]==i and B[y]==i:
        #print(i)
        continue
    elif A[x]==i:
        ans*=(M-y)
        ans%=mod
    elif B[y]==i:
        ans*=(N-x)
        ans%=mod
    else:
        ans*=((N-x)*(M-y)-(N*M-i))
        ans%=mod
    #print(x,y,i,ans)
print(ans)
class UnionFind():
    def __init__(self,n):
        
        self.parents = [-1]*(n+1)

    def find(self, x):
        if self.parents[x] < x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        
        if x == y:
            return
        
        if self.parents[x] > self.parents[y]:
            x, y = y, x
            
        self.parents[x] += self.parents[y]
        self.parents[y] = x

n,m = map(int,input().split())

uf = UnionFind(n)

for i in range(m):
    a,b = map(int,input().split())
    uf.union(a,b)

print(abs(min(uf.parents)))

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1]*n
        
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
        
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        
        if x == y:
            return
        
        if self.parents[x] > self.parents[y]:
            x,y = y,x
            
        self.parents[x] += self.parents[y]
        self.parents[y] = x

n, m = map(int,input().split())

uf = UnionFind(n)

ab = [tuple(map(int,input().split())) for _ in range(m)]

for a,b in ab:
    uf.union(a-1,b-1)

ans = -1
for i in uf.parents:
    ans = min(i,ans)
    
print(-ans)
import math
import numpy as np
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

# arr = np.linspace(A,B,1)
a1 = A-1 // C
a2 = A-1 // D

b1 = B // C
b2 = B // D 

ab1 = b1 - a1
ab2 = b2 - a2


lc = lcm(C,D)

a3 = A // lc
b3 = B // lc
ab3 = b3 - a3
res = ab1 + ab2 - ab3
print(abs(A-B)-res)

### FIXED CODE ###

from fractions import gcd

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

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

ab1 = B // C -  (A-1) // C
ab2 = B // D -  (A-1) // D

lcd = lcm(C,D)

ab3 = B//lcd - (A-1)//lcd

ans = (B-A+1) - (ab1+ab2-ab3)

print(ans)
a,b = map(int,input().split())
aaa = 0
c = 1
while c < b:
    c += a
    aaa += 1
        
print(aaa)


### FIXED CODE ###

s = input()
t = input()

count = 0
for i in range(len(s)):
    if s[i] == t[i]:
        count += 1
        
print(count)
S = input()
K = int(input())
L = len(S)
count = 0
changed = [0]*L

i = 0
while i < L-1:
    if S[i] == S[i+1]:
        changed[i+1] = 1
        i += 2
        count += 1
    else:
        i += 1

if changed[1] == 0 and changed[L-1] == 0 and S[0] == S[L-1]:
    ans = count * K + K -1
else:
    ans = count * K


print(ans)

### FIXED CODE ###

S = list(input())
K = int(input())

if len(set(S)) == 1:
    print((len(S)*K)//2)
    exit()

def n_change(sss):
    s = sss.copy()
    x = 0
    for i in range(1,len(s)):
        if s[i] == s[i-1]:
            s[i] = "X"
            x += 1
    return x

print(n_change(S) + (K-1) * (n_change(2*S) - n_change(S)))
import sympy

def resolve():
    lines = sys.stdin.readlines()
    n, k = tuple(map(int, lines[0].split(' ')))
    a = list(map(int, lines[1].split(' ')))
    divs = sympy.divisors(sum(a))
    divs = list(reversed(divs))

    for div in divs:
        a_mod = list(map(lambda x: x % div, a))
        sum_mod = sum(a_mod)
        if k >= sum_mod//2:
            print(div)
            break
resolve()

### FIXED CODE ###

import sys

def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    table.sort(reverse=True)
    return table

def resolve():
    lines = sys.stdin.readlines()
    n, k = tuple(map(int, lines[0].split(' ')))
    a = list(map(int, lines[1].split(' ')))
    divs = divisor(sum(a))

    for div in divs:
        a_mod = list(map(lambda x: x % div, a))
        sum_mod = sum(a_mod)
        a_mod.sort(reverse=True)
        loop = sum_mod//div
        for i in range(loop):
            a_mod[i] = 0
        sum_e_mod = sum(a_mod)
        if k >= sum_e_mod:
            print(div)
            return
    print(1)

resolve()
k,s = map(int ,input()split())
cnt =0
for x in range(s+1):
	for y in range(s+1):
		z = s - x- y
		if z <= k and 0 <= z:
			cnt += 1

print(cnt)

### FIXED CODE ###

k,s = map(int ,input().split())
cnt =0
for x in range(k+1):
	for y in range(k+1):
		z = s - x- y
		if z <= k and 0 <= z:
			cnt += 1

print(cnt)
def main():
    import collections
    import sys
    sys.setrecursionlimit(500000)
    input = sys.stdin.readline
    N=int(input())
    S=input()
    if N<=3:
        print(0)
    else:
        str_list=list(S[:N])
        result=0
        c=collections.Counter(str_list)
        RGB_list=c.most_common()

        list1=[i for i, x in enumerate(str_list) if x == RGB_list[0][0]]
        list2=[i for i, x in enumerate(str_list) if x == RGB_list[1][0]]
        list3=[i for i, x in enumerate(str_list) if x == RGB_list[2][0]]
        list23=[]
        if RGB_list[2][0]==0 or RGB_list[1][0]==0:
            print(0)
        else:
            for i in list3:
                for j in list2:
                    list23+=[2*i-j,2*j-i,(i+j)/2]
            c1=collections.Counter(list23)
            for k in list1:
                for l in c1.keys():
                    if k==l:
                        result+=c1[l]
            print(int(RGB_list[0][1]*RGB_list[1][1]*RGB_list[2][1]-result))

if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    import collections
    import sys
    sys.setrecursionlimit(5000000)
    input = sys.stdin.readline
    N=int(input())
    S=input()
    if N<=3:
        print(0)
    else:
        str_list=list(S[:N])
        result=0
        c=collections.Counter(str_list)
        RGB_list=c.most_common()

        if len(c)<3:
            print(0)

        else:

            list1=[i for i, x in enumerate(str_list) if x == RGB_list[0][0]]
            list2=[i for i, x in enumerate(str_list) if x == RGB_list[1][0]]
            list3=[i for i, x in enumerate(str_list) if x == RGB_list[2][0]]
            list23=[]

        
            for i in list3:
                for j in list2:
                    list23+=[2*i-j,2*j-i,(i+j)/2]
            c1=collections.Counter(list23)
            for k in list1:
                for l in c1.keys():
                    if k==l:
                        result+=c1[l]
            print(int(RGB_list[0][1]*RGB_list[1][1]*RGB_list[2][1]-result))

if __name__ == '__main__':
    main()
a = int(input())

count = 0
for i in range(len(a)):
  if a[i] == 1:
    count += 1

print(count)

### FIXED CODE ###

s = list(input())
print(s.count("1"))
S = input()
ans =0
for i in (len(S)-1):
  if (S[i] == "A") and (S[i+1] =="C"):
    ans = 1

if ans ==1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()


ans =0
for i in range((len(S)-1)):
  if (S[i] == "A") and (S[i+1] =="C"):
    ans = 1
if ans == 1:
  print("Yes")
else:
  print("No")
s = input()
s=list(s)
zeroc=0
onec=0
for i in s:
  if i == 0:
    zeroc++
  if i == 1:
    onec++
print(min(zeroc,onec)*2)


### FIXED CODE ###

s = input()
s=list(s)
zeroc=0
onec=0
for i in s:
  if i == "0":
    zeroc+=1
  if i == "1":
    onec+=1
print(min(zeroc,onec)*2)
import sys
sys.setrecursionlimit(10000)

N=int(input())

memo=[-1]*(N+1)
memo[0]=0

def f(n):
    global memo
    if memo[n]!=-1:
        return memo[n]
    cnt=n
    pow6=1
    while pow6<=n:
        cnt=min(cnt,f(n-pow6)+1)
        pow6*=6
    pow9=1
    while pow9<=n:
        cnt=min(cnt,f(n-pow9)+1)
        pow9*=9
    memo[n]=cnt
    return cnt

print(f(N))

### FIXED CODE ###

N=int(input())
dp=[N]*(N+1)
dp[0]=0
for i in range(1,N+1):
    dp[i]=min(dp[i],dp[i-1]+1)
    pow6 = 1
    while i>=pow6:
        dp[i]=min(dp[i],dp[i-pow6]+1)
        pow6*=6
    pow9 = 1
    while i>=pow9:
        dp[i]=min(dp[i],dp[i-pow9]+1)
        pow9*=9
print(dp[N])
n=int(input())
s=input()

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


### FIXED CODE ###

n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]==s[n//2:]:
    ans='Yes'
print(ans)
s = list(input())
t = list(input())
s.sort()
t.sort()

r = len(s) if len(s) < len(t) else len(t)
for i in range(0, r):
    if (not s or not t):
        break
    if s.pop(i) == t.pop(i):
        continue
    elif s.pop(i) < t.pop(i):
        print("Yes")
        exit()
    else:
        print("No")
        exit()
print("Yes") if len(s) < len(t) else print("No")


### FIXED CODE ###

s = list(input())
t = list(input())
s.sort()
t.sort()
t.reverse()
print("Yes") if s < t else print("No")
n = int(input())
S = list(map(int, input().split()))
SENTINEL = 10 ** 9 + 1
count = 0

def merge(S, left, mid, right):
    L = S[left:mid] + [SENTINEL]
    R = S[mid:right] + [SENTINEL]
    i = j = 0
    for k in range(left, right):
        if (L[i] <= R[j]):
            S[k] = L[i]
            i += 1
        else:
            S[k] = R[j]
            j += 1
    count += right - left

def mergeSort(S, left, right):
    if(left + 1 < right):
        mid = (left + right) // 2
        mergeSort(S, left, mid)
        mergeSort(S, mid, right)
        merge(S, left, mid, right)

mergeSort(S, 0, n)
print(*S)
print(count)

### FIXED CODE ###

n = int(input())
S = list(map(int, input().split()))
SENTINEL = 10 ** 9 + 1
count = 0
 
def merge(S, left, mid, right):
    L = S[left:mid] + [SENTINEL]
    R = S[mid:right] + [SENTINEL]
    i = j = 0
    global count
    for k in range(left, right):
        count += 1
        if (L[i] <= R[j]):
            S[k] = L[i]
            i += 1
        else:
            S[k] = R[j]
            j += 1
 
def mergeSort(S, left, right):
    if(left + 1 < right):
        mid = (left + right) // 2
        mergeSort(S, left, mid)
        mergeSort(S, mid, right)
        merge(S, left, mid, right)
 
mergeSort(S, 0, n)
print(*S)
print(count)
for i in range(10**6):
    if i*8//100==A and i*10//100==B:
        print(i)
        break
else:
    print(-1)

### FIXED CODE ###

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

for i in range(10**6):
    if i*8//100==A and i*10//100==B:
        print(i)
        break
else:
    print(-1)
N, x = [int(i) for i in input().split(" ")]
lst = [int(i) for i in input().split(" ")]

lst.sort(reverse = True)
cnt = 0

while x > lst[cnt]:
  x -= lst[cnt]
  cnt += 1
  
print(cnt)

### FIXED CODE ###

N, x = [int(i) for i in input().split(" ")]
lst = [int(i) for i in input().split(" ")]
 
lst.sort()
cnt = 0
 
for i in range(0,N-1):
  if x >= lst[i]:
    x -= lst[i]
    cnt += 1
  else:
    break

if x == lst[N-1]:
    cnt +=1
    
print(cnt)
class UF():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m,k=map(int,input().split())
uf=UF(n)
F=[set()for _ in range(n)]
for i in range(m):
    a,b=map(int,input().split())
    uf.union(a-1,b-1)
    F[a-1].add(b-1)
    F[b-1].add(a-1)
    B=[0 for _ in range(n)]
for i in range(k):
    c,d=map(int,input().split())
    if uf.same(c-1,d-1):
        B[c-1]-=1
        B[d-1]-=1

A=[]
for i in range(n):
    A.append(uf.size(i)-1-len(F[i])+B[i])
print(*A)

### FIXED CODE ###

import sys
from collections import defaultdict, deque
 
readline = sys.stdin.readline
n, m, k = map(int, readline().split())
# ab = [list(map(int, readline().split())) for i in range(m)]
# cd = [list(map(int, readline().split())) for i in range(k)]
 
friend = [set() for i in range(n)]
not_friend = [set() for i in range(n)]
 
suggest_friends = [-1] * n
for i in range(m):
    a, b = map(int, readline().split())
    a -= 1
    b -= 1
    friend[a].add(b)
    friend[b].add(a)
    # friend[b].append(a)
for i in range(k):
    c, d = map(int, readline().split())
    c -= 1
    d -= 1
    not_friend[c].add(d)
    not_friend[d].add(c)
    # not_friend[d].append(c)
for i in range(n):
    if suggest_friends[i] != -1:
        continue
    q = deque(friend[i])
    friend_group = set(friend[i])
    while q:
        p = q.popleft()
        for f in friend[p]:
            if not(f in friend_group):
                q.append(f)
                friend_group.add(f)
    num = len(friend_group)
    for f in friend_group:
        suggest_friends[f] = num - 1 - len(friend[f] | not_friend[f] & friend_group)
 
for i in range(n):
    if suggest_friends[i] == -1:
        suggest_friends[i] = 0
print(*suggest_friends)
a=[[int(input())for _ in range(3)]for _ in range(3)]
n=int(input())
b=[int(input())for _ in range(n)]
for i in b:
  for j in range(3):
    for k in range(3):
      if i==a[j][k]:a[j][k]=0
ans="No"
for i in range(3):
  if a[i][0]==a[i][1]==a[i][2]:ans="Yes"
  if a[0][i]==a[1][i]==a[2][i]:ans="Yes"
if a[0][0]==a[1][1]==a[2][2]:ans="Yes"
if a[0][2]==a[1][1]==a[2][0]:ans="Yes"
print(ans)

### FIXED CODE ###

a=[list(map(int,input().split()))for _ in range(3)]
for i in range(int(input())):
  b=int(input())
  for j in range(3):
    for k in range(3):
      if a[j][k]==b:a[j][k]=0
ans="No"
for i in range(3):
  if a[i][0]==a[i][1]==a[i][2]==0:ans="Yes"
  if a[0][i]==a[1][i]==a[2][i]==0:ans="Yes"
if a[0][0]==a[1][1]==a[2][2]==0:ans="Yes"
if a[2][0]==a[1][1]==a[0][2]==0:ans="Yes"
print(ans)
s=list(input())
a=[]
z=[]
for num in range(len(s)):
  if s[num]=='A':
    a.append(num)
  if s[num]=='Z':
    z.append(num)
print(max(z)-min(a)+1)


### FIXED CODE ###

x = int(input())
print('ABC') if x < 1200 else print('ARC')
n = int(input())
a = int(input())
b = int(input())
if n == 1:
  print("Hello World")
else:
  print(a + b)

### FIXED CODE ###

n = int(input())
if n == 1:
  print("Hello World")
else:
  a = int(input())
  b = int(input())
  print(a + b)
N, K = map(int, input().split())
if K = 1:
  print(0)
else:
  print(N - K)

### FIXED CODE ###

N, K = map(int, input().split())
if K == 1:
  print(0)
else:
  print(N - K)
N=int(input())
sum=0.0

for i in range(0,N):
  a=int(input())
  sum+=1/a

print(1/sum)


### FIXED CODE ###

N=int(input())
sum=0.0

A=[i for i in range(N)]

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

for i in range(0,N):
  sum+=1/A[i]

print(1/sum)
import sys
import copy
import string
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

k, s = na()
ct = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if 0 <= z <= k:
            ct += 1
print(ct)











### FIXED CODE ###

k, s = list(map(int, input().split()))
ct = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if 0 <= z <= k:
            ct += 1
print(ct)
N,A,B=map(int,input().split())

print(sum(i in i range(1,N+1) if A<=sum(map(int,str(i)))<=B))


### FIXED CODE ###

a,b,c,d = map(int,input().split())
if a+b > c+d:
    print('Left')
elif a+b == c+d:
    print('Balanced')
else:
    print('Right')
n,k=map(int,input().split())
a=list(map(int,input().split()))
l=[]*n
for i in range(n):
    b=[0,0]
    b[0]+=i+1
    b[1]+=a[i]
    l.append(b)
c=0
ne=0
l1=[0]*n
while True:
    if c==k:
        print(l[ne][1])
        exit()
    ne+=-ne+l[ne][1]-1
    c+=1
    if l1[ne]==0:l1[ne]+=1
    else:
        roop_act+=ne
        break

roop_c=0
while True:
    if c+roop_c==k:
        print(l[ne][1])
        exit()
    if l1[ne]==1:l1[ne]+=1
    else:break
    ne+=-ne+l[ne][1]-1
    roop_c+=1

re=(k-c)%roop_c
if re==0:print(l[ne][0])
else:
    for i in range(re):
        if i==re-1:print(l[ne][1])
        ne+=-ne+l[ne][1]-1

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
l1=[0]*n
l1[0]+=1
c=0 #ループに入る前までの移動回数
now=0#現在位置
ne=a[now]-1 #次の移動位置
while True:
    if c==k:
        print(now+1)
        exit()
    if l1[ne]==0:
        l1[ne]+=1
        now=ne
        ne=a[now]-1
        c+=1
    else:
        now=ne
        ne=a[now]-1
        c+=1
        break

roop_c=0
while True:
    if c+roop_c==k:
        print(now+1)
        exit()
    if l1[ne]==1:
        l1[ne]+=1
        now=ne
        ne=a[now]-1
        roop_c+=1
    else:break

re=(k-c)%roop_c
if re==0:print(now+1)
else:
    for i in range(re):
        if i==re-1:print(ne+1)
        ne+=-ne+a[ne]-1
import math
a, b = map(int, input().split())

lcm = a * b / math.gcd(a, b)
print(int(lcm))

### FIXED CODE ###

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

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

lcm = a * b / gcd(a, b)
print(int(lcm))