Harryxun/stf_run huggingface dataset:
t(i) for i in input().split()]

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

vector = []
for mi in range(m):
    vector.append(int(input()))

for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

### FIXED CODE ###


n, m = [int(i) for i in input().split()]
 
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
 
vector = []
for mi in range(m):
    vector.append(int(input()))
 
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
 
    print(sum)
def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = input()
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    print(num)
    break
  num += 2

### FIXED CODE ###

import math

def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = int(input())
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    print(num)
    break
  num += 2
#
import sys

n,x=map(int, input().split())
L=list(map(int, input().split()))  

d=0
b=0
for i in range(n+1):
    d=d+L[i]
    b+=1
    
    if d > x:
        print(b)
        sys.exit()

### FIXED CODE ###

#
import sys

n,x=map(int, input().split())
L=list(map(int, input().split()))  

d=0
b=0
for i in range(n):
    d=d+L[i]
    b+=1
    if d > x:
        print(b)
        sys.exit()    
    
print(b+1)
n, k = map(int, input().split())
if n <= k:
  print(0)
else:
  h = list(map(int, input().split())).sort()
  print(sum(h[:-k]))

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
if n <= k:
  print(0)
elif k == 0:
  print(sum(h))
else:
  h = sorted(h)
  print(sum(h[:n-k]))
from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = max(d.values())
        mmax = N - mmax
    except:
        print(100)
    if mmax >= 0:
        print(mmax)
    else:
        print(0)


if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = N - max(d.values(), default=0)
        print(mmax)
    except ValueError:
        print(100)

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

a = math.ceil(N / 1000)

b = 1000*a - N

print(b)

### FIXED CODE ###

import math

N = int(input())

a = math.ceil(N / 1000)

b = 1000*a - N

print(b)
A,B,K = list(map(int,input().split()))
for i in list(range(A,B+1))[:K] + list(range(A,B+1))[-1*K:]:
    print(i)

### FIXED CODE ###

A,B,K = map(int,input().split())
for i in sorted(set(range(A,B+1)[:K])|set((range(A,B+1)[-1*K:]))):
    print(i)
num = int(input())
dic = [input() for i in range(num)]

sdic = []
ans = 0
for i in range(num):
    dic[i] = "".join(sorted(dic[i]))
for i in range(num)
    now = dic[0]
    cnt = dic.count(now)
    ans += int((cnt * (cnt - 1)) / 2)
    for i in range(cnt):
        dic.remove(now)
    i += cnt - 1
print(ans)

### FIXED CODE ###

num = int(input())
li = [input() for i in range(num)]

dic = {}
ans = 0
for i in range(num):
    now = "".join(sorted(li[i]))
    if now in dic:
        dic[now] += 1
    else:
        dic[now] = 1
for i in dic:
    n = dic[i]
    ans += int((n*(n-1))/2)

print(ans)
n,l=map(int,input().split())
li=[input() for i in range(n)]

sortli=sorted(li)
print("{}{}{}".format(sortli[0],sortli[1],sortli[2]))

### FIXED CODE ###

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

sortli=sorted(li)
print(''.join(sortli))
cnt = 0
def s(start, end):
    global cnt
    if(start==len(S)-1):
        return cnt
    numS = int(S[start:end+1])
    if(numS%2019==0):
        cnt += 1
    if(end==len(S)-1):
        end = start+2
        s(start+1, end)
        return
    s(start, end+1)

if __name__ == '__main__':
    S = input()
    s(0, 1)
    print(cnt)

### FIXED CODE ###

S = list(map(int, list(input())))[::-1]
N = len(S)
CNT = [0]*2019
CNT[0] = 1
num = 0
d = 0
for i in range(N):
    num += S[i]*pow(10, d, 2019)
    num %= 2019
    CNT[num] += 1
    d += 1
ans = 0 
for cnt in CNT:
    ans += (cnt*(cnt - 1)) // 2
print(ans)
def insertionSort(A,N):
  for i in range(1,len(A)):
      j = i
      while (j > 0) and (A[j-1] > A[j]) :
          tmp = A[j-1]
          A[j-1] = A[j]
          A[j] = tmp
          j -= 1
      print(' '.join(map(str, A)))
N = input()
N = int(N)
A = input()
A = list(map(int, A.split()))
insertionSort(A,N)


### FIXED CODE ###

def insertionSort(A,N):
  for i in range(N):
      j = i
      while (j > 0) and (A[j-1] > A[j]) :
          tmp = A[j-1]
          A[j-1] = A[j]
          A[j] = tmp
          j -= 1
      print(' '.join(map(str, A)))
  
N = input()
N = int(N)
A = input()
A = list(map(int, A.split()))
insertionSort(A,N)
#!/usr/bin/env python3
import sys

def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    i = 0
    while 1:
        if A[i] <= A[i+1] <= A[i+2] or A[i] >= A[i+1] >= A[i+2]:
            i += 1
        else:
            ans += 1
            i += 2
        if i > N - 3:
            ans += 1
            break
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    i = 0
    while 1:
        if i == N:
            break
        # 単調非減少と単調非増加の列の長い方を採用Greedy
        a = i
        while a < N-1 and A[a] <= A[a+1]:
            a += 1
        b = i
        while b < N-1 and A[b] >= A[b+1]:
            b += 1
        i = max(a,b) + 1
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
import sys

def convert(num):
  out = ""
  if num == 0:
    out = "a"
  elif num == 1:
    out = "b"
  elif num == 2:
    out = "c"
  elif num == 3:
    out = "d"    
  elif num == 4:
    out = "e"    
  elif num == 5:
    out = "f"    
  elif num == 6:
    out = "g"
  elif num == 7:
    out = "h"
  elif num == 8:
    out = "i"    
  elif num == 9:
    out = "j"    
  elif num == 10:
    out = "k"    
  elif num == 11:
    out = "l"
  elif num == 12:
    out = "m"
  elif num == 13:
    out = "n"    
  elif num == 14:
    out = "o"    
  elif num == 15:
    out = "p"    
  elif num == 16:
    out = "q"
  elif num == 17:
    out = "r"
  elif num == 18:
    out = "s"    
  elif num == 19:
    out = "t"    
  elif num == 20:
    out = "u"    
  elif num == 21:
    out = "v"
  elif num == 22:
    out = "w"
  elif num == 23:
    out = "x"    
  elif num == 24:
    out = "y"    
  else:
    out = "z"
  return (out)
    
    
    

s = input()
L = []
L.append(s.count("a"))
L.append(s.count("b"))
L.append(s.count("c"))
L.append(s.count("d"))
L.append(s.count("e"))
L.append(s.count("f"))
L.append(s.count("g"))
L.append(s.count("h"))
L.append(s.count("i"))
L.append(s.count("j"))
L.append(s.count("k"))
L.append(s.count("l"))
L.append(s.count("m"))
L.append(s.count("n"))
L.append(s.count("o"))
L.append(s.count("p"))
L.append(s.count("q"))
L.append(s.count("r"))
L.append(s.count("s"))
L.append(s.count("t"))
L.append(s.count("u"))
L.append(s.count("v"))
L.append(s.count("w"))
L.append(s.count("x"))
L.append(s.count("y"))
L.append(s.count("z"))

flag = 0
maxlist = []
for i in range(26):
  if L[i] == max(L):
    maxlist.append(i)
for j in range(len(maxlist)):
  for i in range(len(s)):
    if s[i] == convert(maxlist[j]):
      if s[i+1] == convert(maxlist[j]):
        print("{0} {1}".format(i+1, i+2))
        flag = 1
        break
      if s[i+2] == convert(maxlist[j]):
        print("{0} {1}".format(i+1, i+3))
        flag = 1
        break

if flag == 0:
  print("{0} {1}".format(-1,-1))

### FIXED CODE ###

s = input()

flag = 0
for i in range(len(s)-2):
  if s[i] == s[i+1]:
    print("{0} {1}".format(i+1, i+2))
    flag = 1
    break
  elif s[i] == s[i+2]:
    print("{0} {1}".format(i+1, i+3))
    flag = 1
    break
if s[-1] == s[-2] and flag == 0:
  print("{0} {1}".format(len(s)-1, len(s)))
  flag = 1
    
if flag == 0:
  print("{0} {1}".format(-1, -1))
n = int(input())
t, a = map(int, input().split())
array = list(map(int, input().split()))

sa = 60
for i in range(n):
    if sa > a - (t - array[i] * 0.006):
        sa = a - (t - array[i] * 0.006)
        ans = i

print(ans)

### FIXED CODE ###

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

sa = 10000
for i in range(n):
    if sa > abs(a - (t - array[i] * 0.006)):
        sa = abs((a - (t - array[i] * 0.006)))
        ans = i + 1

print(ans)
x, y = input().split()

max_num = 4 * x
min_num = 2 * x

if y % 2 == 1:
    print('No')
elif (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

x, y =  map(int, input().split())

max_num = 4 * x
min_num = 2 * x

if y % 2 == 1:
    print('No')
elif (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    print('No')
import math

X = int(input())

cur = 100
i = 0

while cur < X:
  cur = math.fllor(cur * 1.01)
  i += 1
  
print(i)

### FIXED CODE ###

import math

X = int(input())

cur = 100
i = 0

while cur < X:
  cur = math.floor(cur * 1.01)
  i += 1
  
print(i)
import math


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

ans = 0

for n in range(1, N+1):
    # 2^(num_success) * n >= K なる num_success
    # 2^(num_success) >= K/n
    # num_success >= log_2(K/n)
    num_success = max(0, math.ceil(math.log2(K/n)))
    ans += (1/2) ** num_success

print(ans/N)


### FIXED CODE ###

import math


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

ans = 0

for n in range(1, N+1):
    # 2^(num_success) * n >= K なる num_success
    # 2^(num_success) >= K/n
    # num_success >= log_2(K/n)
    num_success = max(0, math.ceil(math.log2(K/n)))
    ans += (1/2) ** num_success

print(ans/N)
a,b=int(input())
if(a<b):
    print("a<b")
elif(a>b):
    print("a>b")
else:print("a==b")

### FIXED CODE ###

a,b=map(int,input().split())
if a<b:
    print ("a < b")
elif a>b:
    print ("a > b")
else:
    print ("a == b")
n=int(input())
x = [int(input()) for _ in range(n)]
p = min(x)
q = n//p
print(q+5)

### FIXED CODE ###

n=int(input())
x = [int(input()) for _ in range(5)]
p = min(x)
q = n//p
if n % p == 0:
        print(q+4)
else:
        print(q+5)
def f(x):
    return len(x) % 2 == 0 and x[:len(x)/2] == x[len(x)/2:]
x=input()
while f(x):
    x=x[:-1]
print(len(x))

### FIXED CODE ###

def f(x):
    return len(x) % 2 == 0 and x[:len(x)//2] == x[len(x)//2:]
 
x=input()[:-1]
while not f(x):
    x=x[:-1]
 
print(len(x))
N = int(input())

if N <= 1:
  print(0)
else:
  res = (10**N - 8**N - 2 * (9**N - 8**N)) % mod

  print(int(res))

### FIXED CODE ###


mod = 10**9+7
N = int(input())

if N <= 1:
  print(0)
else:
  res = (10**N - 8**N - 2 * (9**N - 8**N)) % mod

  print(int(res))
n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    pritn("No")

### FIXED CODE ###

n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")
k = int(input())

count = 0
q = deque(range(1,10))

while count < k:
    l = q.popleft()
    resid = l % 10
    if resid != 0: q.append(l*10 + resid - 1)

    q.append(l*10 + resid)
    
    if resid != 9: q.append(l*10 + resid + 1)
    
    count += 1

print(q[k-1])

### FIXED CODE ###

from collections import deque

k = int(input())
count = 0
q = deque(range(1,10))

while count < k:
    l = q.popleft()
    resid = l % 10
    if resid != 0: q.append(l*10 + resid - 1)

    q.append(l*10 + resid)
    
    if resid != 9: q.append(l*10 + resid + 1)
    
    count += 1

print(l)
S = str(input())
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for k in range(0,len(S),1):
  if li_2[k] != ascii_lowercase_list[k]:
    print(ascii_lowercase_list[k])
    break
  elif li_2 == ascii_lowercase_list:
    print("None")
    break

### FIXED CODE ###

S = list(set(input()))
S.sort()
tmp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(tmp),1):
    if tmp[i] not in S:
        print(tmp[i])
        exit()
print("None")
n=int(input())
a=input()

if n%2==1:
  print("No")
else:
  count=0
  m=n//2
  for i in range(m):
    if a[i]==a[i+m]:
      count+=1
    else:
      count=0

if count==m:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n=int(input())
a=input()

if n%2==1:
  print("No")
  exit()
else:
  count=0
  m=n//2
  for i in range(m):
    if a[i]==a[i+m]:
      count+=1
    else:
      count=0

if count==m:
  print("Yes")
else:
  print("No")
import sys
import numpy as np

read = sys.stdin

N, K = map(int, read.readline().split())
k = 2 * K
xyc = np.array(read.read().split(), np.str).reshape(-1, 3)
x = xyc[:, 0].astype(int)
y = xyc[:, 1].astype(int)
c = xyc[:, 2]

x = np.where(c == 'B', x - K, x)
x %= k
y %= k

# grid[[1,2],[1,2]]+=1 としてもgrid[1,2]=1であり重複は考慮されない。
# uniqueを使って(x,y)の重複をカウントする
xy, cnt = np.unique(x + y * 10000, return_counts=True)
x = xy % 10000
y = xy // 10000

grid = np.zeros((3 * K, 3 * K), np.int64)
grid[x, y] += cnt
grid[x + K, y + K] += cnt
grid[x + K, y] -= cnt
grid[x, y + K] -= cnt
np.cumsum(grid, axis=0, out=grid)
np.cumsum(grid, axis=1, out=grid)

p1 = grid[:K, :K] + grid[k:, k:] + grid[K:k, K:k] + grid[k:, :K] + grid[:K, k:]
p2 = grid[K:k, :K] + grid[K:k, k:] + grid[:K, K:k] + grid[k:, K:k]
print(max(p1.max(), p2.max()))


### FIXED CODE ###

import sys
import numpy as np
from collections import Counter

read = sys.stdin

N, K = map(int, read.readline().split())
k = 2 * K
xyc = np.array(read.read().split(), np.str).reshape(-1, 3)
x = xyc[:, 0].astype(int)
y = xyc[:, 1].astype(int)
c = xyc[:, 2]

x = np.where(c == 'B', x - K, x)
x %= k
y %= k

'''
# grid[[1,2],[1,2]]+=1 としてもgrid[1,2]=1であり重複は考慮されない。
# uniqueを使って(x,y)の重複をカウントする
# return_countはver1.9からだった・・・ ダメじゃん
xy, cnt = np.unique(x + y * 10000, return_counts=True)
x = xy % 10000
y = xy // 10000
'''
xy = Counter(list(zip(x, y)))
cnt = np.array(list(xy.values()), np.int64)
xy = np.array(list(xy.keys()), np.int64)
x = xy[:, 0]
y = xy[:, 1]

grid = np.zeros((3 * K, 3 * K), np.int64)
grid[x, y] += cnt
grid[x + K, y + K] += cnt
grid[x + K, y] -= cnt
grid[x, y + K] -= cnt
np.cumsum(grid, axis=0, out=grid)
np.cumsum(grid, axis=1, out=grid)

p1 = grid[:K, :K] + grid[k:, k:] + grid[K:k, K:k] + grid[k:, :K] + grid[:K, k:]
p2 = grid[K:k, :K] + grid[K:k, k:] + grid[:K, K:k] + grid[k:, K:k]
print(max(p1.max(), p2.max()))
MOD = (10 ** 9) + 7

f_list = [1] * 100001
f_r_list = [1] * 100001

for i in range(100000):
	f_list[i + 1] = int((f_list[i] * (i + 2)) % MOD)

def power(n, x):
	if x == 1:
		return n
	elif x % 2 == 0:
		return power(int((n * n) % MOD), int(x / 2))
	else:
		return int((n * power(n, x - 1)) % MOD)

f_r_list[-1] = power(f_list[-1], MOD - 2)

for i in range(2, 100002)
	f_r_list[-i] = int((f_r_list[-i + 1] * (100003 - i)) % MOD)

def comb(n, r):
	if n == 0 or r == 0 or n == r:
		return 1
	else:
		return (((f_list[n - 1] * f_r_list[n - r - 1]) % MOD) * f_r_list[r - 1]) % MOD 

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


doubled = sum(a) - n * (n + 1) / 2
x = a.index(doubled)
y = a_r.index(doubled)
num = x + y

print(n)

for i in range(2, n + 2):
	if num >= i - 1:
		print(int((comb(n + 1, i) - comb(num, i - 1)) % MOD))
	else:
		print(comb(n + 1, i))

### FIXED CODE ###

MOD = (10 ** 9) + 7

f_list = [1] * 100001
f_r_list = [1] * 100001

for i in range(100000):
	f_list[i + 1] = int((f_list[i] * (i + 2)) % MOD)

def power(n, x):
	if x == 1:
		return n
	elif x % 2 == 0:
		return power(int((n * n) % MOD), int(x / 2))
	else:
		return int((n * power(n, x - 1)) % MOD)

f_r_list[-1] = power(f_list[-1], MOD - 2)

for i in range(2, 100002):
	f_r_list[-i] = int((f_r_list[-i + 1] * (100003 - i)) % MOD)

def comb(n, r):
	if n == 0 or r == 0 or n == r:
		return 1
	else:
		return (((f_list[n - 1] * f_r_list[n - r - 1]) % MOD) * f_r_list[r - 1]) % MOD 

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


doubled = sum(a) - n * (n + 1) / 2
x = a.index(doubled)
y = a_r.index(doubled)
num = x + y

print(n)

for i in range(2, n + 2):
	if num >= i - 1:
		print(int((comb(n + 1, i) - comb(num, i - 1)) % MOD))
	else:
		print(comb(n + 1, i))
t=list(map(int,input().split()))
a=list(map(int,input().split()))
b=list(map(int,input().split()))
p,q=[0],[0]
w=[]
for i in range(4):
    p.append(p[-1]+a[i%2]*t[i%2])
    q.append(q[-1]+b[i%2]*t[i%2])
    w.append(p[i+1]-q[i+1])
    if w[-1]==0:
        print("infinity")
        exit()
    if i==3:
        if len(set(w))!=4:
            print("infinity")
            exit()
        chk=0
        if (w[0]>0 and w[1]>0) or (w[0]<0 and w[1]<0):
            print(0)
            exit()
        elif (w[0]>0 and w[1]<0 and w[2]<0) or (w[0]<0 and w[1]>0 and w[2]>0):
            print(1)
            exit()
        elif (w[0]>0 and w[1]<0 and w[2]>0 and w[3]>0) or (w[0]<0 and w[1]>0 and w[2]<0 and w[3]<0):
            print(2)
            exit()
#print(w)
#print(max(abs(w[0]//(w[2]-w[0])),abs(w[1]//(w[3]-w[1])))*2-1)
x,y=(abs(w[0]//(w[2]-w[0])),abs(w[1]//(w[3]-w[1])))
if w[0]<0 and x>y:
    print(x*2-1)
elif w[0]<0 and x<y:
    print(x*2)
else:
    print(hhh)

### FIXED CODE ###

T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
 
P = (A1 - B1) * T1
Q = (A2 - B2) * T2
if P > 0:
	P *= -1
	Q *= -1
 
if P + Q < 0:
	print(0)
elif P + Q == 0:
	print("infinity")
else:
	S = (-P) // (P + Q)
	T = (-P) % (P + Q)
	if T != 0:
		print(S * 2 + 1)
	else:
		print(S * 2)
in = input()
str = list(in)

ca = str.count("A")
cb = str.count("B")

if ca == 3 or cb == 3:
  print("No")
else:
  print("Yes")


### FIXED CODE ###

s = input()
str = list(s)
 
ca = str.count("A")
cb = str.count("B")
 
if ca == 3 or cb == 3:
  print("No")
else:
  print("Yes")
#create environment
import numpy as pd
num = 1
i = 1
k = 1
df = pd.DataFrame()
count_num = 0
f = lambda x: (x**2)

#input1 N D (numeric)
N, D = map(int, input().split())
#input2
for l in range(1, N):
  a = map(int, input().split())
  if a is none:
    break
  df[l] = a

# make combination
df_new = df.T
#a_new = a.T
print(df_new)
for i in range(0, len(df_new.index)):
  for j in range(k, len(df_new.index)):
#    print_str = str(i) + '-' + str(j)
#    print(print_str)
    k = k + 1
    df_new_ij = df_new.loc[[i,j],:]
    obj_num = np.sqrt(df_new_ij.apply(f).cumsum().iloc[1,:].cumsum()[len(df['a'])-1])
    
    if obj_num == round(obj_num):
      count_num = count_num + 1

#print
print(count_num)






### FIXED CODE ###

import math
n, d = map(int, input().split())
x = []
ans=0
for i in range(n):
        o = list(map(int, input().split()))
        x += [o]
for i in range(n):
        for j in range(i+1,n):
                dis_net = 0
                dis=0
                for u in range(d):
                        dis += (x[i][u] - x[j][u])** 2
                dis_net = math.sqrt(dis)
                if dis_net % 1 == 0 and dis_net>=1:
                        ans += 1
print(ans)
a=input()
b=input()
print a*b

### FIXED CODE ###

n=raw_input()
k=n.split(" ")
a=int(k[0])
b=int(k[1])
print a*b ,
print (a+b)*2
import math
n,k=map(int,input().split()) 
lst=list()

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)

### 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)
def main2(N):
    #9*9の表
    lst = list()
    for i in range(1,10):
        lst.append([0]*9)

    for n in range(1, N+1):
        for i in range(1,10):
            for j in range(1,10):
                head = str(n)[0]
                tail = str(n)[-1]
                if i == int(head) and j == int(tail):
                    lst[i-1][j-1] += 1
    
    count = 0
    for i in range(0, len(lst)):
        for j in range(0, len(lst[i])):
            count += lst[i][j] * lst[j][i]

    print(count)

main2(N)

### FIXED CODE ###

def main3(N):
    lst = list()
    for i in range(1, 10):
        lst.append([0]*9)

    for n in range(1, N+1):
        head = int(str(n)[0])
        tail = int(str(n)[-1])
        #末尾が0はNG
        if tail != 0:
            lst[head-1][tail-1] += 1
        
    #for i in range(0, len(lst)):
    #    print(lst[i])
    
    count = 0
    for i in range(0, len(lst)):
        for j in range(0, len(lst[i])):
            count += lst[i][j] * lst[j][i]

    print(count)

N = int(input())
main3(N)
r = raw_input()
r = float(r)
a = r*r*3.141592653
b = 2 * r 3.141592653
print "%.9f %.9f"%(a,b)

### FIXED CODE ###

import math
r = raw_input()
r = float(r)
a = r*r*math.pi
b = 2 * r *math.pi
print "%.9f %.9f"%(a,b)
from scipy.optimize import*;n,a=open(0)
print(round(minimize(lambda x:sum((x-int(b))**2 for b in a.split()),0)["fun"]))

### FIXED CODE ###

n,*A=map(int,open(0).read().split());print(min(sum((x-a)**2for a in A)for x in range(-100,101)))
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def primes(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, n+1):
        if not is_prime[i]:
            continue
        for j in range(i*2, n+1, i):
            is_prime[j] = False
    return [i for i in range(2, n+1) if is_prime[i]]

def main():
    """ main """
    A,B = map(int, input().split())
    _gcd = gcd(A,B)
    ps = primes(_gcd)
    ans = 1
    for p in ps:
        if _gcd%p == 0: ans += 1
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    ass.sort()
    return ass

def main():
    """ main """
    A,B = map(int, input().split())
    ds = divisor(gcd(A,B))
    if len(ds) == 1:
        print(1)
        return 0
    ds = ds[1:]
    dp = [1]*len(ds)
    for i in range(len(ds)):
        if dp[i]:
            for j in range(i+1,len(ds)):
                if ds[j]%ds[i] == 0:
                    dp[j] = 0
    ans = 1
    for d in dp:
        if d == 1: ans += 1
    print(ans)

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

a=a[:n]
b=b[:n]
x=0
for i in a:
	print(a[x],b[x],end='')
	x+=1
print()

### FIXED CODE ###

n=int(input())

a,b=input().split()
a=a[:n]
b=b[:n]
n=0
for i in a:
	print(a[n],end='')
	print(b[n],end='')
	n+=1
print()
print('ABC') if input() == 'ARC' else print('ARC')


### FIXED CODE ###

S = input()
if S == 'ABC':
  print('ARC')
else:
  print('ABC')