Harryxun/stf_run huggingface dataset:
n = int(input())
s_list = [input() for i in range(n)]
s_set = set(s_list)
max = 0
max_elements = []
for i in s_set:
    c = s_list.count(i)
    if c > max:
        max = c
        max_elements = [i]
    if c == max and i not in max_elements:
        max_elements.append(i)

for i in sorted(max_elements):
    print(i)


### FIXED CODE ###

a, b, c = input().split()
count = 0
if(a == b): count += 1
if(b == c): count += 1
if(c == a): count += 1

print("Yes" if(count == 1) else "No")
#

from bisect import bisect

for _ in range(int(input())):
    N, D = map(int, input().split())
    P = list(map(int, input().split()))
    swaps = 0
    possible = True
    for m in range(D):
        order = []
        for i in range(m, N, D):
            if (P[i]-(i+1)) % D:
                possible = False
                break
            idx = bisect(order, P[i])
            swaps += len(order) - idx
            order.insert(idx, P[i])
    if possible:
        print(swaps)
    else:
        print(-1)
    

### FIXED CODE ###

n = int(input())

p = list(map(int,input().split(' ')))

c = 0

for i in range(1, len(p)-1):
  f = p[i-1]
  s = p[i]
  t = p[i+1]
  ma = max(f,t)
  mi = min(f,t)
  if s > mi and s < ma:
    c += 1

print(c)
n,k=map(int,input().split())
s=list(input())
s=list(map(int,s))
stack=[]
tmp=1
for i in range(1,len(s)):
  if s[i]!=s[i-1]:
    stack.append(tmp)
    tmp=1
  else:
    tmp+=1
stack.append(tmp)
acc=[]
acc2=[]
ans=0
if s[0]==1:
  Acc=stack[0]
  Acc2=0
  acc.append(Acc)
  acc2.append(0)
  for i in range(1,len(stack)-len(stack)%2,2):
    Acc+=stack[i]
    Acc+=stack[i+1]
    acc.append(Acc)
    Acc2+=stack[i-1]
    Acc2+=stack[i]
    acc2.append(Acc2)
  if len(stack)%2==1:
    Acc+=stack[-1]
    acc.append(Acc)
    Acc2+=stack[-2]
    Acc2+=stack[-1]
    acc2.append(Acc2)
  for i in range(len(acc)-k):
    ans=max(ans,acc[i+k]-acc2[i])
if s[0]==0:
  Acc=stack[0]
  Acc2=0
  acc.append(0)
  acc.append(Acc)
  acc2.append(0)
  for i in range(1,len(stack)-len(stack)%2,2):
    Acc+=stack[i]
    Acc+=stack[i+1]
    acc.append(Acc)
    Acc2+=stack[i-1]
    Acc2+=stack[i]
    acc2.append(Acc2)
  if len(stack)%2==1:
    Acc+=stack[-1]
    acc.append(Acc)
    Acc2+=stack[-2]
    Acc2+=stack[-1]
    acc2.append(Acc2)
  for i in range(len(acc)-k):
    ans=max(ans,acc2[i+k]-acc[i])
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
s=list(input())
s=list(map(int,s))
stack=[]
tmp=0
now=1
for i in range(n):
  if s[i]==now:
    tmp+=1
  else:
    stack.append(tmp)
    tmp=1
    now=1-now
stack.append(tmp)
if len(stack)%2==0:
  stack.append(0)
Acc=[0]*(len(stack)+1)
for i in range(len(stack)):
  Acc[i+1]=Acc[i]+stack[i]
ans=0
for i in range(0,len(stack),2):
  left = i
  right = min(i+k*2+1,len(stack))
  ans=max(ans,Acc[right]-Acc[left])
print(ans)
S = input()

S_len = len(S)

print(x* S_len)

### FIXED CODE ###

S = input()
 
S_len = len(S)
 
print("x" * S_len)
from itertools import permutations

n = int(input())
p = list(map(int,input().split()))
q = list(map(int,input().split()))

i = 0
a = 0
b = 0

for s in permutaions(range(1,n + 1)):
  for j in range(n):
    if p[j] != s[j]:
      break
  else:
    a = i
  for j in range(n):
    if q[j] != s[j]:
      break
  else:
    b = i
    i += 1
    
print(abs(a-b))

### FIXED CODE ###

from itertools import permutations
 
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
 
i = 0
a = 0
b = 0
for s in permutations(range(1, n+1)):
    for j in range(n):
        if p[j] != s[j]:
            break
    else:
        a = i
    for j in range(n):
        if q[j] != s[j]:
            break
    else:
        b = i
    i += 1
 
print(abs(a-b))
N = int(input())
ans = 0
for i in range(N):
  x, u = map(int,input().split())
  if u == "BTC":
    ans += float(x)*380000
  else:
    ans += int(x)
print(ans)

### FIXED CODE ###

num = int(input())
sum = 0

while num > 0:
  a,b = input().split(" ")
  if b == "JPY":
    sum += int(a)
    
  else:
    c = float(a) * 380000
    sum += c
  num -= 1    
print(sum)
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa > bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
elif aa == bb:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
    print('YES')
else:
    print('NO')
n = int(input())
    a = [int(i) for i in input().split()] 
    count = {}
    ans = 0
    for i in a:
        if i not in count:
            count[i] = 1
        else:
            count[i] += 1
    for i,c in count.items():
        if i > c:
            ans += c
        elif i < c:
            ans += c - i
    print(ans)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()] 
count = {}
ans = 0
for i in a:
    if i not in count:
        count[i] = 1
    else:
        count[i] += 1
for i,c in count.items():
    if i > c:
        ans += c
    elif i < c:
        ans += c - i
print(ans)
s=str(input())
x=''
list=[]
for i in range(len(s)):
    if s[i]=='1':
        list.append('1')
    elif s[i]=='0':
        list.append('0')
    elif s[i]=='B' and len(list)!=0:
        del list[i-1]
    print(list)
for i in range(len(list)):
    x += list[i]

print(x)


### FIXED CODE ###

s=str(input())
x=''
list=[]
for i in range(len(s)):
    if s[i]=='1':
        list.append('1')
    elif s[i]=='0':
        list.append('0')
    elif s[i]=='B' and len(list)!=0:
        del list[len(list)-1]

for i in range(len(list)):
    x += list[i]

print(x)
# B

S=input()
T=input()

def check(i,T):
    ns=S[i:i+len(T)]
    res=0
    for i in range(len(T)):
        if ns[i]!=T[i]:
            res+=1
    return res

print(min([check(i,T) for i in range(len(S)-len(T))]))

### FIXED CODE ###

# B

S=input()
T=input()

def check(i,T):
    ns=S[i:i+len(T)]
    res=0
    for i in range(len(T)):
        if ns[i]!=T[i]:
            res+=1
    return res

print(min([check(i,T) for i in range(len(S)-len(T)+1)]))
import numpy as np
import math
n = int(input())
l = np.empty(n)
l = np.nan

k = 0
i = 1
while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + (n / i) - 2
  i += 1
print(int(np.nanmin(l)))

### FIXED CODE ###

n = int(input())

for i in range(int(n ** 0.5)):
  if n % (int(n ** 0.5) - i) == 0:
    j = n // (int(n ** 0.5) - i)
    break
    
print(int(n ** 0.5) - i + j - 2)
import sys
input=sys.stdin.readline
n,a,b,c=map(int,input().split())
s=[input() for i in range(n)]
dp=[dict() for i in range(n+1)]
dp[0][""]=[a,b,c]
for i in range(n):
    if len(dp[i])==0:
        print("No")
        break
    if s[i]=="AB":
        for j in dp[i]:
            a,b,c=dp[i][j]
            if dp[i][j][0]>0:
                dp[i+1][j+"A"]=[a-1,b+1,c]
            if dp[i][j][1]>0:
                dp[i+1][j+"B"]=[a+1,b-1,c]
    elif s[i]=="AC":
        for j in dp[i]:
            a,b,c=dp[i][j]
            if dp[i][j][0]>0:
                dp[i+1][j+"A"]=[a-1,b,c+1]
            if dp[i][j][2]>0:
                dp[i+1][j+"C"]=[a+1,b,c-1]
    else:
        for j in dp[i]:
            a,b,c=dp[i][j]
            if dp[i][j][1]>0:
                dp[i+1][j+"B"]=[a,b-1,c+1]
            if dp[i][j][2]>0:
                dp[i+1][j+"C"]=[a,b+1,c-1]
else:
    print("Yes")
    z=list(dp[-1])
    #print(z)
    for i in range(n):
        print(z[-1][i])






### FIXED CODE ###

n,a,b,c=map(int,input().split())
s_=[input() for i in range(n)]
ans=""
for i in range(n):
    s1,s2=s_[i]
    if s2=="B":
        if a==1 and b==1 and i!=n-1:
            if s_[i+1][0]=="A":
                a,b,ans=(a+1,b-1,ans+"A")
            else:
                a,b,ans=(a-1,b+1,ans+"B")
            continue
        a,b,ans=(a-1,b+1,ans+"B") if a>b else (a+1,b-1,ans+"A")
        if min(a,b)==-1:
            print("No")
            break
    elif s1=="A":
        if a==1 and c==1 and i!=n-1:
            if s_[i+1][1]=="C":
                a,c,ans=(a-1,c+1,ans+"C")
            else:
                a,c,ans=(a+1,c-1,ans+"A")
            continue
        a,c,ans=(a-1,c+1,ans+"C") if a>c else (a+1,c-1,ans+"A")
        if min(a,c)==-1:
            print("No")
            break
    else:
        if c==1 and b==1 and i!=n-1:
            if s_[i+1][1]=="C":
                b,c,ans=(b-1,c+1,ans+"C")
            else:
                b,c,ans=(b+1,c-1,ans+"B")
            continue
        b,c,ans=(b-1,c+1,ans+"C") if b>c else (b+1,c-1,ans+"B")
        if min(b,c)==-1:
            print("No")
            break
else:
    print("Yes")
    for j in range(n):
        print(ans[j])
def fiv(n):
    return (((1+(5)**(1/2))/2)** (n + 1) - ((1-(5)**(1/2))/2)** (n + 1))/(5**(1/2))

n, m = map(int, input().split())
broken = [input() for i in range(m)]

p = [0] * (m + 1) #broken間の登り方list

for i in range(m + 1):
    if i == 0: #a1 さいしょ
        if broken[0] == 1:
            p[0] = 1
        else:
            p[0] = fiv(broken[0] -1)
    if i == m: #am さいご
        if broken[m] == n - 1:
            p[m] = 1
        else:
            p[m] = fiv(n - broken[0] - 1)
    
    else:
        if broken[i] - broken[i - 1] - 1 == 0:
            print('0')
            exit()
        else:
            p[i] = fiv(broken[i] - broken[i - 1] - 1)

ans = 1
for i in range(m + 1):
    ans = ans * p[i]

print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
mod = 10 ** 9 + 7
dp = [-1 for i in range(n + 1)]
dp[0], dp[1] = 1, 1
for _ in range(m):
    dp[int(input())] = 0
for i in range(2, n + 1):
    if dp[i] != 0:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print(dp[n])
from collections import deque

s = input().strip()
s = deque([*s])
q = int(input())

queries = [input().strip().split() for _ in range(q)]
is_reversed = False

for query in queries:
    t = query[0]
    if t == '1':
        is_reversed = not is_reversed
    else:
        f = query[1]
        c = query[2]
        if f == '1':
            if is_reversed:
                s.append(c)
            else:
                s.appendleft(c)
        else:
            if is_reversed:
                s.appendleft(c)
            else:
                s.append(c)

str_list = list(s)
if is_reversed:
    str_list = reversed(str_list)

ans = ''.join(str_list)
print(ans)


### FIXED CODE ###

from collections import deque

s = input().strip()
s = deque(list(s))
q = int(input())

queries = [input().strip().split() for _ in range(q)]
is_reversed = False

for query in queries:
    t = query[0]
    if t == '1':
        is_reversed = not is_reversed
    else:
        f = query[1]
        c = query[2]
        if f == '1':
            if is_reversed:
                s.append(c)
            else:
                s.appendleft(c)
        else:
            if is_reversed:
                s.appendleft(c)
            else:
                s.append(c)

str_list = list(s)
if is_reversed:
    str_list = reversed(str_list)

ans = ''.join(str_list)
print(ans)
sample = input() # two numbers in a string
new_sample = sample.split(" ")
ball = new_sample[0] # number of balls
color = new_sample[1] # number of colors
product = color

for i in range(1, ball+1):
  product *= color-1
print(product)
  
  
# 2 balls, 10 colors
# 1st spot, 10 choices
# 2nd spot, 9 choices

### FIXED CODE ###

sample = input() # two numbers in a string
new_sample = sample.split(" ")

ball = int(new_sample[0]) # number of balls
color = int(new_sample[1]) # number of colors
if ball > 1 and color == 1:
  print(0)
else:
  product = color
  for i in range(1, ball):
    product *= (color-1)
  print(product)

  
# 3 balls, 10 colors
# 1st spot, 10 choices
# 2nd spot, 9 choices
# 3rd spot, 9 choices
n = int(input())
A = list(map(int, input().split()))

ans = 0
sum = A[0]
for a in A[1:]:
    if (sum + a) * sum < 0:
        sum += a
    else:
        fugo = sum // abs(sum)
        nextsum = - fugo
        a_should_be = nextsum - sum
        dif = abs(a_should_be - a)
        sum += a_should_be
        ans += dif

print(ans)

### FIXED CODE ###

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

if A[0] != 0:
    ans1 = 0
    sum = A[0]
else:
    ans1 = 1
    sum = 1
# A[0]=0 のときは1にする。下で-1にするパターンも試している。なお0は不可。

for a in A[1:]:
    if (sum + a) * sum < 0:
        sum += a
    else:
        nextsum = 1 if sum < 0 else -1
        # fugo = sum // abs(sum) 割り算のときは0に気をつけろ！
        a_should_be = nextsum - sum
        dif = abs(a_should_be - a)
        sum = nextsum
        ans1 += dif

#A[0]を反転したほうがいいパターンの処理
ans2 = abs(A[0]) + 1
sum = 1 if A[0] < 0 else -1
#ある意味、ここでA[0]=0のときに-1にすることもやっている

for a in A[1:]:
    if (sum + a) * sum < 0:
        sum += a
    else:
        nextsum = 1 if sum < 0 else -1
        a_should_be = nextsum - sum
        dif = abs(a_should_be - a)
        sum = nextsum
        ans2 += dif
        
print(min(ans1, ans2))
def main():
    N_keta = int(input())
    S = input()

    total = 0

    for n in range(0, 1000):
        FLAG = False
        n_str = str(n)
        
        while (len(n_str) < 3):
            n_str = '0' + n_str
        
        pos = 0
        cnt = 0
        
        for i in range(3):
            number = int(n_str[i])
            
            while (pos < N_keta):
                num = int(S[pos])
                if (num == number):
                    cnt += 1
                    pos += 1
                    break
                else:
                    pos += 1
            
            if (cnt == 3):
                FLAG = True
                break
        
        if (FLAG):
            total += 1

    print(total)


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N_keta = int(input())
    S = input()

    total = 0

    for n in range(0, 1000):
        FLAG = True
        n_str = "{:03}".format(n)
        pos = 0
        
        for i in n_str:
            numberS = S[pos:]
            if (i not in numberS):
                FLAG = False
                break
            else:
                pos += numberS.index(i) + 1
        
        if (FLAG):
            total += 1

    print(total)


if __name__ == '__main__':
    main()
x,y = map(int,input().split())
mod = 10**9 + 7
if (x+y)%3 != 0:
    print(0)
    exit()
n = (x+y)//3
a = (2 * x - y) // 3
b = (2 * y - x) // 3
if a == 0 or b == 0:
    print(1)
    exit()
if a < 0 or b < 0:
    print(0)
    exit()
MAX = 10
fac = [1,1] + [0] * MAX     #累積積
finv = [1,1] + [0] * MAX    #modにおける逆元
inv = [0,1] + [0] * MAX     #invの累積積
for i in range(2,MAX):
    fac[i] = fac[i-1] * i % mod
    inv[i] = -inv[mod%i] * (mod//i)%mod
    finv[i] = finv[i-1] * inv[i]%mod


def nCr(n,r):
    if n<r:
        return 0
    if n<0 or r<0:
        return 0
    return fac[n] * (finv[r] * finv[n-1]%mod)%mod

print(nCr(n,a))

### FIXED CODE ###

x,y = map(int,input().split())
mod = 10**9 + 7
if (x+y)%3 != 0:
    print(0)
    exit()
n = (x+y)//3
a = (2 * x - y) // 3
b = (2 * y - x) // 3
if a == 0 or b == 0:
    print(1)
    exit()
if a < 0 or b < 0:
    print(0)
    exit()
MAX = 700000
fac = [1,1] + [0] * MAX     #累積積
finv = [1,1] + [0] * MAX    #modにおける逆元
inv = [0,1] + [0] * MAX     #invの累積積
for i in range(2,MAX):
    fac[i] = fac[i-1] * i % mod
    inv[i] = -inv[mod%i] * (mod//i)%mod
    finv[i] = finv[i-1] * inv[i]%mod


def nCr(n,r):
    if n<r:
        return 0
    if n<0 or r<0:
        return 0
    return fac[n] * (finv[r] * finv[n-r]%mod)%mod

print(nCr(n,a))
coordinates = list(map(int, input().rstrip().split()))
w = coordinates[0]
h = coordinates[1]
x = coordinates[2]
y = coordinates[3]
prod1 = x * h
prod2 = y * w
if x == w and y == h:
    prod1 = prod2 = (w * h) / 2
area = min(prod1, prod2)
area = format(area, '.6f')
addit = 0 if prod1 != prod2 else 1
print(f"{area} {addit}")

### FIXED CODE ###

w,h,x,y= map(int,input().split())
print(w*h/2,int(x==w/2 and y == h/2))
n = int(input())
if n[-1] == 3:
  print('bon')
elif n[-1] ==2 or 4 or 5 or 7 or 9:
  print('hon')
else:
  print('pon')

### FIXED CODE ###

n = input()
s = int(n[-1])
if s == 3:
  print('bon')
elif s == 2 or s == 4 or s == 5 or s== 7 or s== 9:
  print('hon')
else:
  print('pon')
inputs=[int(i) for i in input().split()]
k=inputs[-1]
for i in range(5):
  for j in range(5-i):
    if abs(inputs[j]-inputs[i])>k
    print(":(")
 	return

print("Yay!")
return
    




### FIXED CODE ###

inputs=[int(input()) for i in range(6)]
k=inputs[-1]
T=False
for i in range(5):
  for j in range(5-i):
    if abs(inputs[5-j]-inputs[i-1])>k:
      print(":(")
      quit()

print("Yay!")
#coding:UTF-8

a = []
a,b,c = map(int,raw_input().split())
for i in range(a,b+1):
    if c % i == 0
    n += 1
print n

### FIXED CODE ###

#coding:UTF-8

n = 0
a,b,c = map(int,raw_input().split())
for i in range(a,b+1):
    if c % i == 0:
        n += 1
print n
import math as mt
store = []
def binarysearch(min, max):
    mid = int((max + min)/2)
    if (min == max):
        return mid
    elif count(mid) > mid:
        return binarysearch(mid+1, max)
    else:
        return binarysearch(min, mid)

def count(x):
    store = [mt.ceil((n - x*b)/a) for n in hp]
    store = [x for x in store if x > 0]
    return sum(store)

st = 0
min = 10 ** 18
max = 0
n, a, b = [int(x) for x in input().split(' ')]
hp = []
for i in range(n):
    st = int(input())
    if st < min:
        min = st
    if st > max:
        max = st
    hp.append(st)
min, max = mt.ceil(min/a), mt.ceil(max/b)
a = a - b
print(binarysearch(min,max))


### FIXED CODE ###

n = int(input())
sum = 0
sub = 101
for i in range(n):
    store = int(input())
    sum += store
    if store % 10 != 0 and store < sub:
        sub = store
if sum % 10 != 0:
    print(sum)
else:
    if sub == 101:
        print(0)
    else:
        print(sum - sub)
import sys
input = sys.stdin.buffer.readline

def main():
    H,W = map(int,input().split())
    point = [[0]*(W+1) for _ in range(H+1)]
    
    for i in range(H):
        a = list(map(int,input().split()))
        for j in range(W):
            point[i][j] += a[j]
    
    cnt = 0
    for i in range(H):
        b = list(map(int,input().split()))
        for j in range(W):
            point[i][j] = abs(point[i][j]-b[j])
            cnt += point[i][j]

    dp = [[[False]*(cnt+1) for _ in range(W+1)] for _ in range(H+1)]
    dp[0][0][point[0][0]] = True
    for i in range(H):
        for j in range(W):
            for k in range(cnt):
                if k+point[i+1][j] <= cnt:
                    dp[i+1][j][k+point[i+1][j]] = dp[i+1][j][k+point[i+1][j]] or dp[i][j][k]
                if k+point[i][j+1] <= cnt:
                    dp[i][j+1][k+point[i][j+1]] = dp[i][j+1][k+point[i][j+1]] or dp[i][j][k]
                dp[i+1][j][abs(k-point[i+1][j])] = dp[i+1][j][abs(k-point[i+1][j])] or dp[i][j][k]
                dp[i][j+1][abs(k-point[i][j+1])] = dp[i][j+1][abs(k-point[i][j+1])] or dp[i][j][k]
    
    print(dp[H-1][W-1].index(True))
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline

def main():
    H,W = map(int,input().split())
    point = [[0]*W for _ in range(H)]
    
    for i in range(H):
        a = list(map(int,input().split()))
        for j in range(W):
            point[i][j] += a[j]

    for i in range(H):
        b = list(map(int,input().split()))
        for j in range(W):
            point[i][j] = abs(point[i][j]-b[j])
    
    base = 3200
    dp = [[0]*W for _ in range(H)]
    dp[0][0] = (1 << (base+point[0][0])) | (1 << (base-point[0][0]))
    
    for i in range(H):
        for j in range(W):
            if j < W-1:
                dp[i][j+1] |= (dp[i][j] << point[i][j+1])
                dp[i][j+1] |= (dp[i][j] >> point[i][j+1])
            if i < H-1:
                dp[i+1][j] |= (dp[i][j] << point[i+1][j])
                dp[i+1][j] |= (dp[i][j] >> point[i+1][j])
    
    ans = dp[-1][-1] >> base
    for i in range(ans.bit_length()):
        if (ans >> i)&1:
            print(i)
            exit()
    
if __name__ == "__main__":
    main()
nums = [int(e) for e in input().split()]
if(num[1] == 100):
    print(pow(100,nums[0])*(nums[1]+1))
else:
    print(pow(100,nums[0])*nums[1])

### FIXED CODE ###

nums = [int(e) for e in input().split()]
if(nums[1] == 100):
    print(pow(100,nums[0])*(nums[1]+1))
else:
    print(pow(100,nums[0])*nums[1])
A,B = map(int.input().split())
print(A*B)

### FIXED CODE ###

a,b = map(int,input(). split ())
print(a*b)
w,h,x,y = map(int, input().split())
men = float(w * h / 2)
r1 = float(w/x)
r2 = float(h/y)
if (r1 == 2) and (r2 == 2):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))

### FIXED CODE ###

w,h,x,y = map(int, input().split())
men = float(w * h / 2)
if (2*x == w) and (2*y == h):
    han = 1
else:
    han = 0
print("{} {}".format(men,han))
n,k=map(int,input().split())

if n%k==0:
    print("0")
else
    print("1")

### FIXED CODE ###

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

if n%k==0:
    print("0")
else:
    print("1")
n, k = map(int, input().split())

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: 
      return 1
    over = reduce(mul, range(n,n-r,-1)
    under = reduce(mul, range(1,r+1))
    return over//under

def out(num):
    print(num%1000000007)

for i in range(1,k+1):
    if n-k+1 < 1 :
       return 0
    else out(cmb(k-1,i-1)*cmb(n-k+1,i))

### FIXED CODE ###

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

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: 
      return 1
    over = reduce(mul, range(n,n-r,-1))
    under = reduce(mul, range(1,r+1))
    return over//under

def out(num):
    print(num%1000000007)

for i in range(1,k+1):
    if n-k+1 < i :
      print("0")
    else:
      out(cmb(k-1,i-1)*cmb(n-k+1,i))
S = input()

E1 = int(S[:2])
E2 = int(S[2:])

if E1 >= 1 and E1 <= 12 and E2 >= 1 and E2 <= 12:
  print('AMBIGUOUS')
elif E1 >= 1 and E1 <= 12:
  print('MMYY')
elif E2 >= 1 and E2 <= 12:
  print('YYMM')
else
  print('NA')










### FIXED CODE ###

S = input()

E1 = int(S[:2])
E2 = int(S[2:])

if E1 >= 1 and E1 <= 12 and E2 >= 1 and E2 <= 12:
  print('AMBIGUOUS')
elif E1 >= 1 and E1 <= 12:
  print('MMYY')
elif E2 >= 1 and E2 <= 12:
  print('YYMM')
else:
  print('NA')
# 拡張ユークリッド互除法
# ax + by = gcd(a,b)の最小整数解を返す
def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)


# mを法とするaの乗法的逆元
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m

from functools import reduce

MOD = 10**9+7

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

c = N-K+1

res = [1]*(K+1)
n = c
for i in range(1, K+1):
    res[i] *= n
    n *= c-i
    n %= MOD

n = reduce(lambda x,y: (x*y)%MOD, range(1,K+1))
n = modinv(n, MOD)

for i in reversed(range(1, K+1)):
    res[i] *= n
    res[i] %= MOD
    n *= i
    n %= MOD

c = K-1
n = 1
for i in range(1, K+1):
    res[i] *= n
    n *= c-i+1
    n %= MOD

n = reduce(lambda x,y: (x*y)%MOD, range(1,K))
n = modinv(n, MOD)

for i in reversed(range(1, K+1)):
    res[i] *= n
    res[i] %= MOD
    n *= i-1
    n %= MOD



for a in res[1:]:
    print(a)

### FIXED CODE ###

# 拡張ユークリッド互除法
# ax + by = gcd(a,b)の最小整数解を返す
def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)


# mを法とするaの乗法的逆元
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m


def comb(n, max_k, mod):
    """
    (n,k) := n個からk個選ぶ組み合わせ
    k = 0~max_Kまでを計算して返す
    """
    res = [1]*(max_k+1)
    t = 1
    for i in range(max_k+1):
        res[i] *= t
        t *= n-i
        t %= mod

    n = reduce(lambda x,y: (x*y)%mod, range(1,max_k+1), 1)
    n = modinv(n, mod)

    for i in reversed(range(max_k+1)):
        res[i] *= n
        res[i] %= mod
        n *= i
        n %= mod
    return res

from functools import reduce
def solve(N,K):
    MOD = 10**9+7


    r1 = comb(N-K+1, min(K, N-K+1), MOD)
    r2 = comb(K-1, K-1, MOD)

    r1 += [0]*max(0,K+1-len(r1))
    return [(a*b)%MOD for a,b in zip(r1[1:],r2)]


if __name__ == '__main__':
    N,K = map(int,input().split())
    print(*solve(N,K), sep='\n')