Harryxun/stf_run huggingface dataset:
S = list(input())

N = len(S)
child = [1] * N 
memo = [child]
loopmemo = []

for count in range(1,10**100):
    tmpChild = child.copy()
    for i in range(N):
        if S[i] == "R" and child[i] >= 1:
            tmpChild[i+1] += child[i]
            tmpChild[i] -= child[i]

        elif S[i] == "L" and child[i] >= 1:
            tmpChild[i-1] += child[i]
            tmpChild[i] -= child[i]
    if child == tmpChild:
        ans = [str(n) for n in child]
        ans = " ".join(ans)
        print(ans)
        break
    child = tmpChild
    memo.append(child)
    if len(memo) >= 3:
        if memo[count-2] == memo[count]:
            ansNum = count - 2
            loopmemo.append(memo[count])
            loopmemo.append(memo[count-1])
            ans = [str(n) for n in loopmemo[(10 * 100 - ansNum) % 2]]
            ans = " ".join(ans)
            print(ans)
            break


### FIXED CODE ###

S = list(input())
N = len(S)
child = [1] * N
memo = []

# RLのインデックスを取得する
for i in range(N-1):
    if S[i] == "R" and S[i+1] == "L":
        memo.append(i)
        memo.append(i+1)
memo.append("dummy")
count = 0
for i in range(N):
    if i != memo[count]:
        if S[i] == "R":
            if (memo[count] - i) % 2 == 0:
                child[memo[count]] += 1
                child[i] -= 1
            else:
                child[memo[count+1]] += 1
                child[i] -= 1
        elif S[i] == "L":
            if (i - memo[count-1]) % 2 == 0:
                child[memo[count-1]] += 1
                child[i] -= 1
            else:
                child[memo[count-2]] += 1
                child[i] -= 1
    else:
        count += 1

ans = [str(n) for n in child]
ans = " ".join(ans)
print(ans)
a, b, c = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
area = int((0.5*a)*b)
print(area)

### FIXED CODE ###

a, b, c = map(int, input().split())
area = int((b * a)/2)
print(area)
n=int(input())
a=list(map(int, input().split()))
if a[0]>0:
    ans=-1
x=0
ans=1
nezen=1
suu=0
su=0
for x in a:
    su+=x
    suu+=x
for x in range(1,n):
    if nezen<0:
        ans=-1
        break
    ha=a[x]
    su-=ha
    ne=(min(su,nezen*2-ha))
    if ne<=0:
        ans=-1
        break
    ans+=ne
    nezen=ne
if ans!=-1:
    ans+=suu
    nezen=ne
    if ne<=0:
        ans=-1
print(ans)

### FIXED CODE ###

def aaaa():
    n=int(input())
    a=list(map(int, input().split()))
    ans=0
    if a[0]>0:
        if a[0]==1 and n==0:
            return 1
        else:
            return -1
        return -1
    nezen=1
    hazen=0
    line=[]
    liha=[]
    line.append(nezen)
    liha.append(hazen)
    su=0
    su=sum(a[x] for x in range(len(a)))
    for x in range(1,n+1):
        if nezen<=0:
            return -1
        ha=a[x]
        su-=ha
        ne=min(nezen*2-ha,su)
        nezen=ne
        line.append(ne)
        liha.append(ha)
    if line[n]<0:
        return -1
    line[n]=0
    for x in range(len(line)):
        ans+=line[x]+liha[x]
    return ans
print(aaaa())
# -*- coding: utf-8 -*-

K = int(input())
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][K+1])


### FIXED CODE ###

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

K = int(input())
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][K-1])
l = [*map(int, input().split())]
l.sort()
if l[0] == l[1] and l[0] != l[2]:
    print("YES")
elif l[0] == l[2] and l[0] != l[1]:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a, b, c = map(int, input().split())
if (a == b and a != c) or (a ==c and a != b) or (b == c and b != a):
    print("Yes")
else:
    print("No")
N, A, B = map(int, input().split())

r=N//(A+B)
s=N%(A+B)

if(B=0):
  t=N//A + N%A

else:
  if(A!=0):
    t=(A*r)+s
  else:
    t=0

print(t)

### FIXED CODE ###

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

if(A==0 & B==0):
  print("0")

else:
  r=N//(A+B)
  s=N%(A+B)
  if(A<s):
    s=A
  if(A!=0):
    t=(A*r)+s
  else:
    t=0
  print(t)
input()
a = list(map(int, input().split()))
a.sort(reverse=True)
i, c = 0, 0
m = list()
while i < len(a)-1:
    if a[i] == a[i+1]:
        m.append(a[i])
        i += 1
        c += 1
    i += 1
    if c == 2:
        break
if c == 2:
    print(m[0]*m[1])
else:
    print(0)

### FIXED CODE ###

x,a,b=map(int,input().split())
if abs(x-a)>abs(x-b):
  print('B')
else:
  print('A')
a,b.c=map(int,input().split())
if a+b<c:
    print('NO')
else:
    print('YES')

### FIXED CODE ###

a,b,c=map(int,input().split())
if a+b>=c and a<=c:
  print('YES')
else:
  print('NO')
N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0] * (W+1) for _ in range(N+1)]

for i in range(1, N+1):
    for w in range(1, W+1):
        if wv[i][0] <= w:
            dp[i][w] = max(dp[i][w], dp[i][w-wv[i-1][0]] + wv[i-1][1])
        dp[i][w] = max(dp[i][w], dp[i-1][w])

print(dp[N][W])


### FIXED CODE ###

N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0 for _ in range(W+10)] for _ in range(N+5)]

for w in range(1, W+1):
    for n in range(N):
        Wi = wv[n][0]
        Vi = wv[n][1]
        if Wi <= w:
            dp[n+1][w] = max(dp[n][w], dp[n][w-Wi] + Vi)
        dp[n+1][w] = max(dp[n][w], dp[n+1][w])

print(dp[N][W])
import math
N,M = map(int, input().split())
def combinations_count(n,r):
	return math.fractorial(n) / (math.fractorial(n-r)*math.fractorial(r))
print(combinations_count(N,2) + combinations_count(M,2))

### FIXED CODE ###

import math
N,M = map(int, input().split())
def combinations_count(n,r):
	if n == 0 or n == 1:
		return 0
	elif n == 2:
		return 1
	else: return math.factorial(n) // (math.factorial(n-r)*math.factorial(r))
print(combinations_count(N,2) + combinations_count(M,2))
a,b,c,d=map(int,input().split())
s=[]
for i in range(0,101):
  if a<=i<=b and c<=i<=d:
    s.append(i)
print(max(s)-min(s))

### FIXED CODE ###

a,b,c,d=map(int,input().split())
s=[]
for i in range(0,101):
  if a<=i<=b and c<=i<=d:
    s.append(i)
print(0 if len(s)==0 else max(s)-min(s))
from bisect import bisect_left, bisect_right

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

a.sort()
z = a.count(0)
mc = bisect_left(a, 0)
pc = n - z - mc

if k <= mc * pc:
    d = a[:mc]
    u = a[mc + z:]
    H = 0
    L = d[0] * u[-1]
    while H - L > 1:
        M = (H + L) // 2
        count = 0
        for x in u:
            #print(M, x, M // x)
            count += bisect_right(d, M // x)
        #print(L, H, count)
        if count == k:
            break
        elif count < k:
            L = M
        else:
            H = M
    if count == k:
        print(M)
    else:
        print(M+1)
    exit()
elif k <= mc * pc + z * (n - z):
    print(0)
    exit()
print(a[10 ** 6])


### FIXED CODE ###

import numpy as np

n, k = map(int, input().split())
a = np.array(input().split(), np.int64)

a = np.sort(a)

u = a[a > 0]
d = a[a < 0]
z = len(a[a == 0])

if len(u) * len(d) < k <= len(u) * len(d) + z * (n-z) + z * (z-1) // 2:
    print(0)
    exit()

L = - 10 ** 18
H = 10 ** 18

while H - L > 1:
    M = (H + L) // 2
    count = 0
    if M > 0:
        count += z * n
    count += np.searchsorted(a, M // u, side='right').sum()
    count += (n - np.searchsorted(a, (- M - 1) // (- d), side='right')).sum()
    count -= np.count_nonzero(a * a <= M)
    count //= 2
    #print(count)
    if count >= k:
        H = M
    else:
        L = M

print(H)
x ,y ,z = map(int,intput().split())
print(z,x,y)


### FIXED CODE ###

x ,y ,z = map(int,input().split())
print(z,x,y)
N = int(input().rstrip())
A = []
for _ in range(N):
    A.append(int(input().rstrip()))

max_num = max(A)

for i in range(N):
    if A[i] != max_num:
        print(max_num)
    else:
        if i == N - 1:
            print(max(A[0:i]))
        else:
            print(max(max(A[0:i]),max(A[i + 1:])))


### FIXED CODE ###

N = int(input().rstrip())
A = []
for _ in range(N):
    A.append(int(input().rstrip()))

A_sorted = sorted(A)

for i in range(N):
    if A[i] != A_sorted[-1]:
        print(A_sorted[-1])
    else:
        print(A_sorted[-2])
a=int(input())
if a ==7or5or3:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

a=int(input())
if a==3 or a==5 or a==7:
  print('YES')
else:
  print('NO')
import sys
input = sys.stdin.readline
from collections import Counter
import math
def main():
    N, P = map(int, input().split())
    S = input().rstrip("\r\n")[::-1]
    ans = 0
    if P == 2 or P == 5:
        for i in range(N):
            if int(S[i]) % P == 0:ans += N-i
    else:
        D = [0] * (N+1)
        D[0] = int(S[0]) % P
        for i in range(1, N):
            a = int(S[i]) * int(math.pow(10, i)) % P
            D[i] = (a + D[i-1]) % P
        c = Counter(D)
        for v in c.values():
            ans += v*(v-1)//2
    print(ans)
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
from collections import Counter
def main():
    N, P = map(int, input().split())
    S = list(map(int, input().rstrip("\r\n")))
    S.reverse()
    ans = 0
    if P == 2 or P == 5:
        for i in range(N):
            if S[i] % P == 0:ans += N-i
    else:
        A = [0] * N
        tenpow = 1
        for i in range(N):
            A[i] = (S[i]*tenpow) % P
            tenpow *= 10
            tenpow %= P
        D = [0] * (N+1)
        for i in range(N):
            D[i+1] = (D[i] + A[i]) % P
        c = Counter(D)
        for v in c.values():
            ans += v*(v-1)//2
    print(ans)
if __name__ == "__main__":
    main()
N = int(input())
M = int(input())
if N == M:
  print("Yes")
  else:
    print("No")

### FIXED CODE ###

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

if (N==M):
  print("Yes")
else:
  print("No")
n = int(input())
m = int(input())
a = [list(map(int, input().split())) for i in range(0,n)]
result = [0 for i in range(m)]

for mindex in range(0,m):
    for nindex in range(0,n):
        for kindex in range(1,a[nindex][0]+1):
            if a[nindex][kindex] == mindex+1:
                result[mindex]+=1
            else:
                pass
                

print(result.count(n+1))

### FIXED CODE ###

n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
result = [0 for i in range(m)]
for mindex in range(0,m):
    for nindex in range(0,n):
        for kindex in range(1,a[nindex][0]+1):
            if a[nindex][kindex] == mindex+1:
                result[mindex]+=1
            else:
                pass
                
 
print(result.count(n))
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

manzoku=0;
i=0; #A[i]を参照する
while i<len(A):
	a=A[i]
	manzoku+=B[a]
	if i+1<n and A[i+1]-A[i]==1 :
		manzoku+=C[a]
	i+=1
print(manzoku)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum =0;
for i in range(len(a)):
    sum += b[a[i]-1]
    if i +1 < n and a[i+1] - a[i] == 1:
        sum += c[a[i]-1]
print(sum)
h, w = map(int, input().split())
s = []  # h, w
for i in range(h):
    s += [','.join(input()).split(',')]

cost = [[1 if s[0][0] == '#' else 0 for i in range(w)] for j in range(h)]

for i in range(1, h + w-1):
    for j in range(w if h < w else h):
        if i - j < w and j >= 0 and i - j >= 0:
            if j == 0:
                cost[j][i - j] = cost[j][i - j - 1]
            elif i - j == 0:
                cost[j][i - j] = cost[j - 1][i - j]
            else:
                cost[j][i - j] = cost[j - 1][i - j] if cost[j - 1][i -
                                                                   j] < cost[j][i - j - 1] else cost[j][i - j - 1]

            if s[j][i - j] == '#':
                cost[j][i - j] += 1

print(cost[h - 1][w - 1])

### FIXED CODE ###

h, w = map(int, input().split())
s_list = []  # h, w
dp_dict = {}
for i in range(h):
    s = input()
    temp_list = []
    for temp in s:
        if temp == "#":
            temp_list.append(1)
        else:
            temp_list.append(0)
    s_list.append(temp_list)


def search(x, y, black):
    res = 0
    if (x, y, black) in dp_dict:
        return dp_dict[(x, y, black)]
    if x == w-1 and y == h-1:
        if s_list[y][x] == 1:
            if black:
                res = 0
            else:
                res = 1
        else:
            res = 0
    elif x == w-1:
        if s_list[y][x] == 1:
            if black:
                res = search(x, y+1, True)
            else:
                res = search(x, y+1, True)+1
        else:
            res = search(x, y+1, False)
    elif y == h-1:
        if s_list[y][x] == 1:
            if black:
                res = search(x+1, y, True)
            else:
                res = search(x+1, y, True)+1
        else:
            res = search(x+1, y, False)
    else:
        if s_list[y][x] == 1:
            if black:
                res = min([search(x+1, y, True), search(x, y+1, True)])
            else:
                res = min([search(x+1, y, True), search(x, y+1, True)])+1
        else:
            res = min([search(x+1, y, False), search(x, y+1, False)])
    dp_dict[(x, y, black)] = res
    return res


print(search(0, 0, False))
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
    else:
        break

res = A * B / k
print(int(res))


### FIXED CODE ###

import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
        break


if k == 0:
    k = 1


res = A * B / k

print(int(res))
# coding: utf-8
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))


def BinarySearch(num, List):
    if len(List) == 0:
        print("Erorr : list has no element")
        return
    left,right = 0,len(List)
    while left < right:
        mid  = (left+right)//2
        if num < List[mid]:#
            right = mid
        else:
            left = mid + 1
    return right


def main():
    nn = ni()
    atmp = sorted(na())
    a = []
    if atmp[0] != atmp[1]:
        a = [atmp[0]]
    pre = atmp[0]
    for i in range(1, nn):
        if pre != atmp[i]:
            a += [atmp[i]]
    n = len(a)
    if n == 0:
        print(0)
        return
    asub = [i for i in a]
    ans = 0
    for i in range(n):
        ai = a[i]
        if ai != -1:
            ans += 1
            cnt = 2
            right = i
            while right != n:
                right = BinarySearch(ai*cnt, asub)
                if a[right-1] == ai*cnt:
                    a[right-1] = -1
                cnt += 1
    print(ans)
    return


if __name__ == '__main__':
    main()

### FIXED CODE ###

# coding: utf-8
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))


def BinarySearch(num, List):
    if len(List) == 0:
        print("Erorr : list has no element")
        return
    left,right = 0,len(List)
    while left < right:
        mid  = (left+right)//2
        if num < List[mid]:#
            right = mid
        else:
            left = mid + 1
    return right


def main():
    n = ni()
    a = sorted(na())
    asub = [i for i in a]

    for i in range(n):
        ai = a[i]
        right = BinarySearch(ai, a)
        if right-1 != i:
            asub[right-1] = -1
            asub[i] = -1
            continue
        cnt = 2
        while right != n:
            right = BinarySearch(ai*cnt, a)
            if asub[right-1] == ai*cnt:
                asub[right-1] = -1
            cnt += 1
    
    ans = 0
    for i in range(n):
        if asub[i] != -1:
            ans += 1
    print(ans)
    return


if __name__ == '__main__':
    main()
st=input()
j="0"
u="0"
for i in st:
    if i=="d" and u=="0":
        u="d"
        j="1"
    elif i=="r" and u=="d":
        u="r1"
    elif i=="e" and u=="r1":
        u="e1"
    elif i=="a" and u=="e1":
        u="a1"
    elif i=="m" and u=="a1":
        u="0"
    elif i=="e" and u=="0":
        u="e2"
        j="2"
    elif i=="r" and u=="e2":
        u="0"
    """"""    
    elif i=="e" and u=="0":
        u="e3"
        j="0"
    elif i=="r" and u=="e3":
        u="r2"
    """"""
    elif i=="a" and u=="0" and j=="2":
        u="a2"
    elif i=="s" and u=="a2":
        u="s"
    elif i=="e" and u=="s":
        u="0"
        j="3"
    elif i=="r" and j=="3":
        j="0"
    else:
        print("NO")
        exit(0)
if u=="0":
    print("YES")
else:
    print("NO")

### FIXED CODE ###

st=input()
c="0"
j="0"
u="0"
for i in st:
    if i=="d" and u=="0" and c=="0":
        u="d"
        j="1"
    elif i=="r" and u=="d":
        u="r1"
    elif i=="e" and u=="r1":
        u="e1"
    elif i=="a" and u=="e1":
        u="a1"
    elif i=="m" and u=="a1":
        u="0"
        
    elif i=="e" and u=="0" and c=="0":
        u="e2"
        if j !="1":
            c="1"
    elif i=="r" and u=="e2":
        u="0"
        j="2"
    elif i=="a" and u=="0" and j=="2":
        u="a2"
    elif i=="s" and u=="a2":
        u="s"
    elif i=="e" and u=="s":
        u="0"
        c="0"
        j="3"
    elif i=="r" and u=="0" and j=="3":
        j="0"
    else:
        print("NO")
        exit(0)
if u=="0"and c=="0":
    print("YES")
else:
    print("NO")
x = list(map(int,input().split()))
x = x.sort()
print("{0} {1} {2}".format(x[0],x[1],x[2]))

### FIXED CODE ###

x = list(map(int,input().split()))
x = sorted(x)
print("{0} {1} {2}".format(x[0],x[1],x[2]))
a = str(input())
while True:
  for i in range(len(a)//2):
    if all(a[i]==a[i+(len(a)//2)]):
      print(len(a))
      exit()
  a.pop(-1)

### FIXED CODE ###

n = input()
num = len(n)-2
for i in range(num,0,-2):
  f = int(i/2)
  if n[:f]==n[f:i]:
    print(i)
    break
from collections import Counter
n,m = map(int, input().split())
a = list(map(int, input().split()))
c = [0]*100001
b = [a[i]%m for i in range(n)]
rem = [0]*m
for i in range(n):
    rem[b[i]] += 1
    c[a[i]] += 1
ans = 0
for i in range(m//2+1):
    if i == 0 or i*2 == m:
        ans += rem[i]//2
        rem[i] -= rem[i]//2*2
        continue
    less = min(rem[i],rem[m-i])
    ans += less
    rem[i] -= less
    rem[m-i] -= less
for j in range(n//m+1):
    for i in range(m):
        if rem[i] >= c[m*j+i]:
            ans += c[m*j+i]//2
            rem[i] -= c[m*j+i]//2
        else:
            ans += rem[i]//2
            rem[i] -= rem[i]//2
print(ans)

### FIXED CODE ###

from collections import Counter
n,m = map(int, input().split())
a = list(map(int, input().split()))
amax = max(a)
c = [0]*(amax+1)
b = [a[i]%m for i in range(n)]
rem = [0]*m
for i in range(n):
    rem[b[i]] += 1
    c[a[i]] += 1
ans = 0
for i in range(m//2+1):
    if i == 0 or i*2 == m:
        ans += rem[i]//2
        rem[i] -= rem[i]//2*2
        continue
    less = min(rem[i],rem[m-i])
    ans += less
    rem[i] -= less
    rem[m-i] -= less
for j in range(amax//m+1):
    for i in range(m):
        if m*j+i<=amax:
            if rem[i] >= c[m*j+i]:
                ans += c[m*j+i]//2
                rem[i] -= c[m*j+i]//2*2
            else:
                ans += rem[i]//2
                rem[i] -= rem[i]//2*2
print(ans)
a = map(int,input())
print(a**2)

### FIXED CODE ###

r = int(input())
A = r**2
print(A)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)
st = 0
flag = True
for i in range(m):
  b, c = bc[i]
  if flag and st < n:
    for i in range(st, b+st):
      if a[i] < c:
        a[i] = c
      else:
        flag = False
        break
    st += b
  else:
    break

print(sum(a))

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)
st = 0
flag = True
for i in range(m):
  b, c = bc[i]
  if flag and st < n:
    for i in range(st, min(b+st, n)):
      if a[i] < c:
        a[i] = c
      else:
        flag = False
        break
    st += b
  else:
    break

print(sum(a))
#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush,heapify
from bisect import bisect_left

def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    A.sort()
    q = []
    for i in range(M):
        B, C = map(int, input().split())
        heappush(q,(-C,B))
    
    ans = 0
    index = 0
    # print(A)
    while q:
        c,b = heappop(q)
        c *= -1
        # print(c,b)
        count = 0
        for i in range(b):
            if c > A[index+i]:
                ans += c
                count += 1
            else:
                break

        # print(ans,index)
        if count < b:
            index += count
            break
        else:
            index += count
            
    print(ans + sum(A[index:]))

if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush,heapify
from bisect import bisect_left

def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    A.sort()
    q = []
    for i in range(M):
        B, C = map(int, input().split())
        heappush(q,(-C,B))
    
    ans = 0
    index = 0
    # print(A)
    while q:
        c,b = heappop(q)
        c *= -1
        # print(c,b)
        count = 0
        for i in range(b):
            if i + index == N:
                break
            if c > A[index+i]:
                ans += c
                count += 1
            else:
                break

        # print(ans,index)
        if count < b:
            index += count
            break
        else:
            index += count
            
    print(ans + sum(A[index:]))

if __name__ == "__main__":
    main()
from math import factorial
N,K=map(int, input().split()) 
lst=list(K)

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1, K+1):
    lst.append((combinations_count(N-K+1, i)) * (combinations_count(K-i+(i-1), i-1)))
        
for i in range(K):
    print(lst[i]%(10**9+7))

### FIXED CODE ###

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

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

mod_num = 10 ** 9 + 7
for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        print(comb(n-k+1, i) * comb(k-i+(i-1), i-1) % mod_num)