Harryxun/stf_run huggingface dataset:
in_str = input()
input_list = list(map(int,in_str.split()))
A = input_list[0]
B = input_list[1]
K = input_list[2]
count = 0
ans = 0
for i in range(100):
  if(A/i==0 and B/i==0):
    ans = i
    count+=1
    if(count==K):
      break
print(ans)

### FIXED CODE ###

in_str = input()
input_list = list(map(int,in_str.split()))
A = input_list[0]
B = input_list[1]
K = input_list[2]
count = 0
ans = 0
max = 100
for i in range(max):
  div = max-i
  if(A%div==0 and B%div==0):
    ans = div
    count+=1
    if(count==K):
      break
print(ans)
import numpy as np
import sys
H, W, M = map(int, input().split())

d = np.zeros((H, W), dtype=np.int64)

for _ in range(M):
    h, w = map(int, input().split())
    d[h-1, w-1] = 1
print(1)
exit()
tate = np.sum(d, axis=0)
yoko = np.sum(d, axis=1)
tate_max = tate.max()
yoko_max = yoko.max()

ans_tate, ans_yoko = [], []

for i in range(W):
    if tate[i] == tate_max:
        ans_tate.append(i)

for i in range(H):
    if yoko[i] == yoko_max:
        ans_yoko.append(i)

for h in ans_yoko:
    for w in ans_tate:
        if not d[h, w]:
            print(tate_max+yoko_max)
            sys.exit()
print(tate_max+yoko_max-1)

### FIXED CODE ###

import sys
H, W, M = map(int, input().split())
h_list, w_list = [0]*H, [0]*W
check = set()
for _ in range(M):
    h, w = map(int, input().split())
    check.add((h-1, w-1))
    h_list[h-1] += 1
    w_list[w-1] += 1
h_max, w_max = max(h_list), max(w_list)
h_bom = [i for i in range(H) if h_list[i]==h_max]
w_bom = [i for i in range(W) if w_list[i]==w_max]
for h in h_bom:
    for w in w_bom:
        if not (h, w) in check:
            print(h_max+w_max)
            sys.exit()
print(h_max+w_max-1)
a,b,c = list(map(int,input().split()))
b = a//c
b = b//c if b%c else b//c-1
print(a1-a2)

### FIXED CODE ###

l = list(map(str,input().split()))
v = ''
for i in range(len(l)):
    v = v + l[i][0]
print(v)
A, B = map(int, input().split())

if 6 <= A <= 12:
  B = B / 2
elif 5 => B:
  B = 0
else:
  psss

print(int(B))

### FIXED CODE ###

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

if 6 <= A <= 12:
  B = B / 2
elif 5 >= A:
  B = 0
else:
  pass

print(int(B))
Sold = list(map(str, input()))
Snew = list(set(S))
alfa = [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
for i in range(27):
  if Snew[i] != alfa[i]:
    print(alfa[i])
    exit()
print('None')

### FIXED CODE ###

S = list(map(str, input()))
S = set(S)
a = set(list('abcdefghijklmnopqrstuvwxyz'))
if len(list(a-S)) == 0:
  print('None')
else:
  print(sorted(list(a-S))[0])
while True:
    a,b,c = input().split()
    n = int(a)
    s = int(b)
    e = int (c)
    if not n+s+e:
        break
    s = s//100*60+s%100
    e = e//100*60+e%100
    t = [0]*60*24    
    for i in range(n):
        m = int(input())
        for j in range(m):
            a,b = input().split()
            ss = int(a)
            ee = int(b)
            t[ss//100*60+ss%100] += 1
            t[ee//100*60+ee%100] -= 1
    cnt = 0
    ans = 0
    ma = -1
    for i in range(e):
        cnt += t[i]
        if i < s:
            continue
        if not cnt:
            ans += 1
        else:
            if ma < ans:
                ma = ans
                ans = 0
    print(ma if ma > ans else ans)

### FIXED CODE ###

while True:
    n,s,e = input().split()
    n = int(n)
    s = int(s)
    e = int(e)
    if not n+s+e:
        break
    s = s//100*60+s%100
    e = e//100*60+e%100
    t = [0]*(60*24+1)
    for i in range(n):
        m = int(input())
        g = input().split()
        j = 0
        for o in g:
            a = int(o)
            if j%2:
                t[a//100*60+a%100] += 1
            else:
                t[a//100*60+a%100] -= 1
            j += 1
    cnt = n
    ans = 0
    ma = -1
    for i in range(e):
        cnt += t[i]
        if i < s:
            continue
        if cnt:
            ans += 1
        else:
            if ma < ans:
                ma = ans
            ans = 0
    print(ma if ma > ans else ans)
n, m = map(int, input().split())
a = list(map(int, input().split()))

num1 = a[0]
num2 = 0
while num1 % 2 == 0:
    num1 //= 2
    num2 += 1
gc = 2 ** num2

b = []
for i in a:
    if i % gc != 0 or (i // gc) % 2 == 0:
        print(0)
        exit()
    else:
        b.append(i // gc)

from math import gcd
lcm = 1
for i in b:
    lcm = (lcm * i) // gcd(lcm, i)

ans = m // lcm
if ans % 2 == 0:
    ans //= 2
else:
    ans = (ans + 1) // 2
print(ans)

### FIXED CODE ###

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

num1 = a[0]
num2 = 0
while num1 % 2 == 0:
    num1 //= 2
    num2 += 1
gc = 2 ** num2

b = []
for i in a:
    if i % gc != 0 or (i // gc) % 2 == 0:
        print(0)
        exit()
    else:
        b.append(i // gc)

from fractions import gcd
lcm = 1
for i in b:
    lcm = (lcm * i) // gcd(lcm, i)

ans = m // (lcm * (gc // 2))
ans = (ans + 1) // 2
print(ans)
import sys

sys.setrecursionlimit = 100000

def get_gcd(A, B):
    r = A%B
    if r == 0:
        return B
    else:
        return get_gcd(B, r)
           
if __name__ == '__main__':
    N = int(input())
    T = [int(input()) for _ in range(N)]
    
    for n in range(N-1):
        gcd = get_gcd(T[n], T[n+1])
        T[n+1] = int(T[n]/gcd)*T[n+1]
        
    print(T[N-1])

### FIXED CODE ###

import sys

sys.setrecursionlimit = 10000000

def get_gcd(A, B):
    r = A%B
    if r == 0:
        return B
    else:
        return get_gcd(B, r)
           
if __name__ == '__main__':
    N = int(input())
    T = [int(input()) for _ in range(N)]
    
    ans = 1
    for t in T:
        gcd = get_gcd(ans, t)
        ans = t//gcd*ans
        
    print(ans)
n,s = input().sprit()
n = int(n)

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

### FIXED CODE ###

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

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

root = math.floor(math.sqrt(s))

if s <= 10 ** 9:
  print(0,0,0,1,s,0)
else:
  for i in reversed(range(root)):
    if s % i == 0:
      print(0,0,0,i,s//i,0)
      break
  

### FIXED CODE ###

import math
s = int(input())

root = math.ceil(math.sqrt(s))

if s <= 10 ** 9:
  print(0,0,0,1,s,0)
else:
  tmp = root**2 - s
  print(0,0,tmp,root,root,1)
input = int(input())
output = input ** 3
return output

### FIXED CODE ###

input = int(input())
print(input ** 3)
N=list(int(input()))
if N[-1]==0 or N[-1]==1 or N[-1]==6 or N[-1]==8:
  print("pon")
elif N[-1]==3:
  print("bon")
else:
  print("hon")

### FIXED CODE ###

N=list(map(int,input()))

if N[-1]==0 or N[-1]==1 or N[-1]==6 or N[-1]==8:
  print("pon")
elif N[-1]==3:
  print("bon")
else:
  print("hon")
while True:
    n = list(map(int,input()))
    if n[0] ==0:
        break
    else:
        print(n.sum())


### FIXED CODE ###

while True:
    n = list(map(int,input()))
    if n[0] ==0:
        break
    else:
        print(sum(n))
n=int(input())
v_list = list(map(int,input().split()))
odd_list = []
even_list = []

for i in range(n):
    if i % 2 == 0:
        odd_list.append(v_list[i]) 
    else:
        even_list.append(v_list[i])

import collections

odd_list_c = collections.Counter(odd_list)
even_list_c = collections.Counter(even_list)

if odd_list_c.most_common()[0][0] != even_list_c.most_common()[0][0]:
    ans = n - odd_list_c.most_common()[0][1] - even_list_c.most_common()[0][1]
else:
    if odd_list_c.most_common()[0][1] >= even_list_c.most_common()[0][1]:
        ans = n - odd_list_c.most_common()[0][1] - even_list_c.most_common()[1][1]
    else:
        ans = n - odd_list_c.most_common()[1][1] - even_list_c.most_common()[0][1]

print(ans)

### FIXED CODE ###

n=int(input())
v_list = list(map(int,input().split()))
odd_list = []
even_list = []

for i in range(n):
    if i % 2 == 0:
        odd_list.append(v_list[i]) 
    else:
        even_list.append(v_list[i])

import collections

odd_list_c = collections.Counter(odd_list)
even_list_c = collections.Counter(even_list)

if odd_list_c.most_common()[0][0] != even_list_c.most_common()[0][0]:
    ans = n - odd_list_c.most_common()[0][1] - even_list_c.most_common()[0][1]
else:
    if len(even_list_c) == 1 and len(odd_list_c) == 1:
        ans = n // 2
    else: 
        ans1 = n - odd_list_c.most_common()[0][1] - even_list_c.most_common()[1][1]
        ans2 = n - odd_list_c.most_common()[1][1] - even_list_c.most_common()[0][1]
        ans = min(ans1, ans2)

print(ans)
import networkx as nx

def main():
  N,M=map(int,input().split())
  S = [list(input()) for _ in range(N)]

  if N == M == 1:
    print(0)
    print(S[0][0])
    exit()

  index = lambda i,j: i*M+j

  G=nx.DiGraph()
  G.add_node('source')
  G.add_node('sink')
  dx,dy=(1,0),(0,1)
  for i in range(N):
    for j in range(M):
      if S[i][j]=='#':continue
      if (i+j) %2:
        G.add_edge(index(i,j),'sink',capacity=1)
      else:
        G.add_edge('source',index(i,j),capacity=1)
      for k in range(2):
        v1,v2 = index(i,j),index(i+dx[k],j+dy[k])
        if not (0<=i+dx[k]<N and 0<=j+dy[k]<M):
          continue
        if S[i+dx[k]][j+dy[k]] == '#': continue
        if (i+j) % 2:
          G.add_edge(v2,v1,capacity=1)
        else:
          G.add_edge(v1,v2,capacity=1)
         
  print(0/0)
  flow_value, flow_dict = nx.maximum_flow(G, "source", "sink")

  for v1 in flow_dict.keys():
    if v1 in ('sink','source'):continue
    for v2 in flow_dict[v1]:
      if v2 in ('sink','source'):continue
      if flow_dict[v1][v2]:
        i1,j1 = divmod(v1,M)
        i2,j2 = divmod(v2,M)
        (i1,j1),(i2,j2) = sorted([(i1,j1),(i2,j2)])
        if i1 + 1 == i2:
          S[i1][j1] = 'v'
          S[i2][j2] = '^'
        else:
          S[i1][j1] = '>'
          S[i2][j2] = '<'

  print(flow_value)
  for i in range(N):
    print(''.join(S[i]))
    
if __name__ == "__main__":
  main()

### FIXED CODE ###

import networkx as nx

def main():
  N,M=map(int,input().split())
  S = [list(input()) for _ in range(N)]

  if N == M == 1:
    print(0)
    print(S[0][0])
    exit()

  index = lambda i,j: i*M+j

  G=nx.Graph()
  dx,dy=(1,0),(0,1)
  E = []
  n1,n2 = [],[]
  for i in range(N):
    for j in range(M):
      if S[i][j]=='#':continue
      if (i+j)%2:
        n1.append(index(i,j))
      else:
        n2.append(index(i,j))
      for k in range(2):
        v1,v2 = index(i,j),index(i+dx[k],j+dy[k])
        if not (0<=i+dx[k]<N and 0<=j+dy[k]<M):
          continue
        if S[i+dx[k]][j+dy[k]] == '#': continue
        if (i+j) % 2:
          E.append((v2,v1))
        else:
          E.append((v1,v2))
     
  G.add_nodes_from(n1, bipartite=0)
  G.add_nodes_from(n2, bipartite=1)
  G.add_edges_from(E)
  u = [n for n in G.nodes if G.nodes[n]['bipartite'] == 0]
  match = nx.bipartite.maximum_matching(G, top_nodes=u)
  match = {v:match[v] for v in match.keys() if v < match[v]}
 
  for v in match.keys():
    i1,j1 = divmod(v,M)
    i2,j2 = divmod(match[v],M)
    if i1 > i2 or j1 > j2:
      (i1,j1),(i2,j2) = (i2,j2),(i1,j1)
    if i1 < i2:
      S[i1][j1] = 'v'
      S[i2][j2] = '^'
    else:
      S[i1][j1] = '>'
      S[i2][j2] = '<'

  print(len(match))
  for i in range(N):
    print(''.join(S[i]))
    
if __name__ == "__main__":
  main()
import math
r = int(input())
a = math.pi * math.pow(r, 2)
c = 2*math.pi*r

print('{} {}'.format(a,c))
	


### FIXED CODE ###

import math
r = float(input())
a = math.pi * math.pow(r, 2)
c = 2*math.pi*r

print('{} {}'.format(a,c))
a,b,c=int(input())
if a==c:
  print("Yes")
elif a!=c:
  print("No")

### FIXED CODE ###

a,b,c=input()
if a==c:
  print("Yes")
else:
  print("No")
def main():
    n, k = [int(i) for i in input().split()]
    num = [int(i) for  i in input().split()]
    if k >= n:
        return 0
    else:
        l = sorted(num)
        return sum(l[0:n-k])
print(main())


### FIXED CODE ###

def main():
    num = [int(i) for i in input().split()]
    h = num[0]
    a = num[1]
    return attack(h, a)

def attack(h,a):
    if h % a == 0:
        return h // a
    elif h % a >= 1:
        return (h//a) + 1

print(main())
n = int(input())
a = list(map(int, input().split()))
anss = [0] * n
for _ in a:
    anss[a-1] += 1
for ans in anss:
    print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
anss = [0] * n
for _ in a:
    anss[_-1] += 1
for ans in anss:
    print(ans)
from math import sqrt as s

N = int(input())

if N == 1: print(1)
else:
  total = 1
  for i in range(2, N+1):
    count = 0
    for j in range(1, int(s(i))+1):
      if i % j == 0: count += 1
    if s(i) % 1 == 0: count = count * 2 - 1
    else: count *= 2
    total += i * count

print(total)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N+1):
  j = N // i
  ans += j * (j + 1) * i // 2
print(ans)
from collections import Counter

n = int(input())
b = [input() for _ in range(n)]
m = int(input())
r = [input() for _ in range(m)]

db, dr = [Counter(x) for x in (b, r)]

print(max(*(v-dr[k] for k, v in db.items()), 0))


### FIXED CODE ###

from collections import Counter

n = int(input())
b = [input() for _ in range(n)]
m = int(input())
r = [input() for _ in range(m)]

db, dr = [Counter(x) for x in (b, r)]
print(max(*[v-dr[k] for k, v in db.items()]+[0]))
import string

S = input()
alphabets = list(string.ascii_lowercase)
lastWord = ''.join(alphabets[::-1])
cnt = [S.count(chr(ord('a')+i)) for i in range(26)]
if len(S) == 26:
    if S == lastWord: print(-1)
    else:
        for i in S:
            if alphabets[i] != S[i]:
                print(S[:i] + alphabets[i])
                break
else:
    print('test')

### FIXED CODE ###

import string

S = input()
reversedS = ''.join(list(S)[::-1])
alphabets = list(string.ascii_lowercase)
lastWord = ''.join(alphabets[::-1])
cnt = [S.count(chr(ord('a')+i)) for i in range(26)]
if len(S) == 26:
    if S == lastWord: print(-1)
    else:
        found = False
        for i in range(len(reversedS)):
            s = reversedS[i]
            largeS = alphabets[ord(s)-ord('a')+1:]
            tailS = list(S)[26-i-1:]
            for lS in largeS:
                if lS in tailS:
                    print(S[:26-i-1]+lS)
                    found = True
                    break
            if found: break
else:
    for j in range(26):
        if cnt[j] == 0:
            S += chr(ord('a')+j)
            print(S)
            break
r = int(input(''))
print(2*r*math.pi)

### FIXED CODE ###

import math
r = int(input(''))
print(2*r*math.pi)
N,M = map(int,input().split())

#print(N,M)

num=[]
answer=[]
correct=[False] * N
correctCount = 0
wrongCount = 0
wrong=[0] * N
for k in range(M):
    n,a=input().split()
    num.append(int(n))
    answer.append(a)
    if a == "AC":
        if correct[int(n)] == False:
            correct[int(n)] = True
            correctCount += 1
            wrongCount += wrong[int(n)]
    else:
        if correct[int(n)] == False:
            wrong[int(n)] += 1



    
#print(num)
#print(answer)
    
'''
preCorrect = False
correctCount=0
wrongCount = 0
temp_wrongCount = 0


for i in range(M):
    if i > 0 and num[i] != num[i-1]:
        if preCorrect == True:
            preCorrect = False
            temp_wrongCount = 0
        else:
            temp_wrongCount = 0
    
    
    if preCorrect == True:
        continue

    if answer[i] == "AC":
        correctCount += 1
        preCorrect = True
        wrongCount += temp_wrongCount
    if answer[i] == "WA":
        temp_wrongCount += 1
'''
print(correctCount, wrongCount)

### FIXED CODE ###

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

ac = [False] * N
wa = [0] * N
for _ in range(M):
    p, S = input().split()
    p = int(p) - 1
    if S == 'AC':
        ac[p] = True
    else:
        if not ac[p]:
            wa[p] += 1

a = 0
b = 0
for i in range(N):
    if ac[i]:
        a += 1
        b += wa[i]
print(*[a, b])
d=int(input())
print('Christmas' if d==25 'Christmas Eve' elif d==24 'Christmas Eve Eve' else 'Christmas Eve Eve Eve')

### FIXED CODE ###

d=int(input())
print('Christmas' if d==25 else 'Christmas Eve' if d==24 else 'Christmas Eve Eve' if d==23 else 'Christmas Eve Eve Eve')
N, K = int(input().split())
juice = []
for i in range(N):
    juice.append(list(input().split()))
juice.sort()
for i in range(K):
  print (juice[0:K])

### FIXED CODE ###

N,K = map(int, input().split())
*a, = map(int, input().split())
print (sum(sorted(a)[:K]))
a,b,c=int(input())
print("Yes" if (a+b) > c "No" else)

### FIXED CODE ###

a,b,c=map(int,input().split())
print("Yes" if a+b >= c else "No")
x = int(input())
print(max([int(x**(1/i))**i for i in range(100)]))

### FIXED CODE ###

x = int(input())
print(max([i**ii for i in range(1,34) for ii in range(2,11) if i**ii <= x]))
N = int(input())
S = input()
K = int(input())

a = S[K + 1]

for i in range(len(S)) :
    if S[i] != a :
        print('*', end="")
    else :
        print(S[i], end="")
print()


### FIXED CODE ###

N = int(input())
S = input()
K = int(input())

a = S[K - 1]

for i in range(len(S)) :
    if S[i] != a :
        print('*', end="")
    else :
        print(S[i], end="")
print()
n=int(input())
dat = list(map(int, input().split()))

flag=True
count = 0

while (flag==True):
    for i in range(n):
            if dat[i]%2==1:
                flag=False
                break
           else:
                dat[i] = dat[i]/2
     count = count+1

print(count)
         


 
      
      
             


    
    
     
                

         
           




### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
# a:高橋 体力
# b:高橋 攻撃力
# c:青木　体力
# d:青木　攻撃力

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

while c > 0:
  c = c-b　#青木体力
  if c <= 0:
    print("Yes")
  a = a-d
  if a <= 0:
    print("No")
  

### FIXED CODE ###

s, w = map(int, input().split())
if s > w:
  print("safe")
else:
  print("unsafe")
#B

import numpy as np
D = int(input())
C = list(map(int,input().split()))
S = np.empty((D,26))
for i in range(D):
    l = list(map(int,input().split()))
    for j in range(26):
        S[i][j] = l[j]
        
#開催日時の記録
R = np.zeros(26)

sc = 0
for i in range(1,D+1):
    
    #ランダムに開催するコンテストを選ぶ
    con = int(input()) - 1
    
    #スコア計算
    #コンテスト開催による上昇
    sc += S[i-1][con]
    R[con] = i
    
    #コンテスト非開催による減少
    for j in range(26):
        sc -= C[j]*(i-R[j])
        
    print(sc)

### FIXED CODE ###

#B

import numpy as np
D = int(input())
C = list(map(int,input().split()))
S = np.empty((D,26))
for i in range(D):
    l = list(map(int,input().split()))
    for j in range(26):
        S[i][j] = l[j]
        
#開催日時の記録
R = np.zeros(26)

sc = 0

#与えられたtでスコアを計算
for i in range(1,D+1):
    
    #ランダムに開催するコンテストを選ぶ
    con = int(input()) - 1
    
    #スコア計算
    #コンテスト開催による上昇
    sc += S[i-1][con]
    R[con] = i
    
    #コンテスト非開催による減少
    for j in range(26):
        sc -= C[j]*(i-R[j])
        
    print(int(sc))
n = int(input())
s = input()
print(count("ABC"))

### FIXED CODE ###

n = int(input())
s = input()
print(s.count("ABC"))
h, w = [int(num) for num in input().split()]
lis = []
for i in range(h):
  lis.append([a for a in input()])

def h_remove():
  pop_list = []
  h_c = 0
  pop_flag = False
  global h, w, lis
  while h_c < h:
    if lis[h_c].count("#") == w  or  lis[h_c].count(".") == w:
      lis.pop(h_c)
      h -= 1
      pop_flag = True
    else:
      h_c += 1
  return pop_flag

def transpose(list):
  return [[arr_w[i] for arr_w in list] for i in range(len(list[0]))]

def w_remove():
  global h, w, lis
  lis = transpose(lis)
  h, w = w, h
  pop_flag = h_remove()
  lis = transpose(lis)
  h, w = w, h
  return pop_flag

lis = transpose(transpose(lis))

pop_h, pop_w = True, True
while (pop_h == True) or (pop_w == True):
  pop_h = h_remove()
  pop_w = w_remove()
print(lis)

### FIXED CODE ###

h, w = map(int, input().split())

pic = [""] * h
for i in range(h):
  pic[i] = input()

row = [False] * h
col = [False] * w
for i in range(h):
  for j in range(w):
    if pic[i][j] == "#":
      row[i] = True
      col[j] = True

for i in range(h):
  if row[i] == True:
    for j in range(w):
      if col[j] == True:
        print(pic[i][j], end = "")
    print()
s = input()
t = input()

#print(s)
#print(t)

n = len(s)

dic = {}
dic2 = {}


for i in range(n):
    if s[i] in dic:
        if dic[s[i]] != t[i]:
            print("No")
            sys.exit()
            
    else:
        dic[s[i]] = t[i]
            
            
    if t[i] in dic2:
        if dic2[t[i]] != s[i]:
            print("No")
            sys.exit()
            
    else:
        dic2[t[i]] = s[i]
        
print("Yes")
        


### FIXED CODE ###

import sys

s = input()
t = input()

#print(s)
#print(t)

n = len(s)

dic = {}
dic2 = {}


for i in range(n):
    if s[i] in dic:
        if dic[s[i]] != t[i]:
            print("No")
            sys.exit()
            
    else:
        dic[s[i]] = t[i]
            
            
    if t[i] in dic2:
        if dic2[t[i]] != s[i]:
            print("No")
            sys.exit()
            
    else:
        dic2[t[i]] = s[i]
        
print("Yes")
import sys
import numpy as np
def rec(N,dp,i,j,k):
    if dp[i][j][k]>=0:return dp[i][j][k]
    if all([i==0,j==0,k==0]):return 0.0
    res=0.0
    if i>0:res+=rec(N,dp,i-1,j,k)*i
    if j>0:res+=rec(N,dp,i+1,j-1,k)*j
    if k>0:res+=rec(N,dp,i,j+1,k-1)*k
    res+=N
    res*=1.0/(i+j+k)
    dp[i][j][k]=res
    return dp[i][j][k]
def main():
    N=int(sys.stdin.readline())
    a=tuple(map(int,sys.stdin.readline().split()))
    n1,n2,n3=a.count(1),a.count(2),a.count(3)
    dp=np.full((310,310,310),-1,dtype='float')
    print(rec(N,dp,n1,n2,n3))
if __name__=='__main__':main()

### FIXED CODE ###

import sys
def rec(N,dp,i,j,k):
    if dp[i][j][k]>=0.0:return dp[i][j][k]
    if all([i==0,j==0,k==0]):return 0.0
    res=0.0
    if i>0:res+=rec(N,dp,i-1,j,k)*i
    if j>0:res+=rec(N,dp,i+1,j-1,k)*j
    if k>0:res+=rec(N,dp,i,j+1,k-1)*k
    res=(res+N)*1.0/(i+j+k)
    dp[i][j][k]=res
    return dp[i][j][k]
def main():
    N=int(sys.stdin.readline())
    a=tuple(map(int,sys.stdin.readline().split()))
    n1,n2,n3=a.count(1),a.count(2),a.count(3)
    dp=[[[-1.0 for _ in range(n3+1)] for _ in range(n2+n3+1)] for _ in range(n1+n2+n3+1)]
    print(rec(N,dp,n1,n2,n3))
if __name__=='__main__':main()
n = int(input())
S=[]
for i in range(n):
    S.append(input())

ans = []
#チェックする文字をS[0]から取得
for i in S[0]:
    #すべてのSについてチェックする文字の存在判定
    hantei=[]
    for j in range(1,n):
        hantei.append(S[j].find(i)) #存在する位置をリストに追加
    if min(hantei) >= 0: ans.append(i)

#辞書順にする
ans.sort()
#文字列にする
ans2 = ''.join(ans)
print(ans2)


### FIXED CODE ###

n = int(input())
S=[]
for i in range(n):
    S.append(input())

ans = []

if n>1:
    #チェックする文字をS[0]から取得
    for i in S[0]:
        #すべてのSについてチェックする文字の存在判定
        hantei=[]
        for j in range(1,n):
            idx = S[j].find(i)
            hantei.append(idx) #存在する位置をリストに追加
            if idx >= 0: S[j] = S[j][:idx] + S[j][idx+1:] #存在した場合はそれを除去そておく
        if min(hantei) >= 0: ans.append(i)
else:
    ans = [i for i in S[0]]

#辞書順にする
ans.sort()
#文字列にする
ans2 = ''.join(ans)
print(ans2)
n=int(input())
for a in range(1,10):
  for b in  range(1,10):
    if n=a*b:
      print("Yes")
      exit()
else:
  print("No")

### FIXED CODE ###

n=int(input())
for a in range(1,10):
  for b in range(1,10):
    if n==a*b:
      print("Yes")
      exit()
    
print("No")
N = int(input())
ans = ""
while N > 26:
    N, mod = divmod(N, 26)
    if mod == 0: mod = 26 
    print(N,mod)
    ans += chr(96+mod)
    if N < 27:break
ans += chr(96+mod) 
print(ans[::-1])

### FIXED CODE ###

N = int(input())
ans = ""
while N > 0:
    N -= 1
    ans += chr(97 + N%26)
    N //= 26
print(ans[::-1])