Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

""" E
    https://atcoder.jp/contests/abc173/tasks/abc173_e
"""
import sys
import math
from functools import reduce

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return reduce(lambda acc, _: acc + [readIntegerSet(m)], range(0, n), [])

def main(N, X, M):
    A = X
    l = [A]
    i = -1
    for _ in range(1, N):
        A = (A * A) % M if M > 0 else 0
        try:
            i = l.index(A)
            break
        except ValueError:
            l.append(A)

    if i == -1:
        return sum(l)
    else:
        s1 = sum(l[:i])
        len_repeat = len(l) - i
        s2 = sum(l[i:])

        return s1 + int((N-i)/len_repeat) * s2 + sum(l[i:(N-i)%len_repeat+i])

if __name__ == "__main__":
    _N, _X, _M = readIntegerSet(3)

    print(main(_N, _X, _M))

### FIXED CODE ###

""" E
    https://atcoder.jp/contests/abc173/tasks/abc173_e
"""
import sys
import math
from functools import reduce

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return reduce(lambda acc, _: acc + [readIntegerSet(m)], range(0, n), [])

def main(N, X, M):
    A = X
    m = {A: A}
    i = -1
    for j in range(1, M):
        A = (A * A) % M if M > 0 else 0
        if A in m:
            i = list(m.keys()).index(A)
            break
        else:
            m[A] = A

    if i == -1:
        return sum(m.values())
    else:
        l = list(m.values())
        s1 = sum(l[:i])
        len_repeat = len(l) - i
        s2 = sum(l[i:])

        return s1 + int((N-i)/len_repeat) * s2 + sum(l[i:(N-i)%len_repeat+i])

if __name__ == "__main__":
    _N, _X, _M = readIntegerSet(3)

    print(main(_N, _X, _M))
### BUGGY CODE ###

import sys
from collections import deque


fin = sys.stdin.readline
H, W = [int(elem) for elem in fin().split()]
A_list = [fin().rstrip("\n") for _ in range(H)]
assert len(A_list[0]) == W

distances = [[float('inf')] * W for _ in range(H)]
que = deque((i, j, 0) for i in range(H) for j in range(W) if A_list[i][j] == "#")
max_dist = 0
while que:
    i, j, dist = que.popleft()
    for next_i, next_j in ((i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)):
        if not (0 <= next_i < H and 0 <= next_j < W):
            continue
        elif distances[next_i][next_j] < float('inf'):
            continue
        elif A_list[next_i][next_j] == "#":
            continue
        else:
            que.append((next_i, next_j, dist + 1))
            distances[next_i][next_j] = dist + 1
            max_dist = max(max_dist, dist + 1)
print(max_dist)


### FIXED CODE ###

import sys
from collections import deque


fin = sys.stdin.readline
H, W = [int(elem) for elem in fin().split()]
A_list = [fin().rstrip("\n") for _ in range(H)]
assert len(A_list[0]) == W

visited = [[False] * W for _ in range(H)]
que = deque((i, j, 0) for i in range(H) for j in range(W) if A_list[i][j] == "#")
max_dist = 0
while que:
    i, j, dist = que.popleft()
    for next_i, next_j in ((i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)):
        if not (0 <= next_i < H and 0 <= next_j < W):
            continue
        elif visited[next_i][next_j]:
            continue
        elif A_list[next_i][next_j] == "#":
            continue
        else:
            que.append((next_i, next_j, dist + 1))
            visited[next_i][next_j] = True
            max_dist = max(max_dist, dist + 1)
print(max_dist)
### BUGGY CODE ###

pcsl = [[0 for i in range(1001)] for j in range(1001)]

def lcs(x, y):
    lx = len(x)
    ly = len(y)
    for i in range(lx):
        for j in range(ly):
            if x[i] == y[j]:
                pcsl[i][j] = pcsl[i - 1][j - 1] + 1
            elif pcsl[i - 1][j] > pcsl[i][j - 1]:
                pcsl[i][j] = pcsl[i - 1][j]
            else:
                pcsl[i][j] = pcsl[i][j - 1]
    print(pcsl[i][j])


q = int(input())

for i in range(q):
    ax = input()
    ay = input()
    lcs(ax, ay)

### FIXED CODE ###

def lcs_len(x, y):
    indices = [0]
    for y_i in y:
        t_index = 0
        for i, index in enumerate(indices, 1):
            c_index = x.find(y_i, t_index) + 1
            if c_index:
                if i < len(indices):
                    t_index = indices[i]
                    indices[i] = min(c_index, t_index)
                else:
                    indices.append(c_index)
                    break
    print(len(indices) - 1)


q = int(input())

for i in range(q):
    ax = input()
    ay = input()
    lcs_len(ax, ay)
### BUGGY CODE ###

def main():
    n, c, k, *t = map(int, open(0).read().split())
    t = sorted(t)
    u = tuple(t)

    count = 0
    i = 0
    while i < n:
        x = u[i] + k
        y = min(i + c - 1, n - 1)
        while True:
            if u[y] <= x:
                break
            y -= 1

        count += 1
        i = y + 1

    print(count)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    n, c, k, *t = map(int, open(0).read().split())
    t = sorted(t)
    u = tuple(t)

    cnt = 1
    p, l = 0, u[0] + k
    for v in t:
        if v <= l and p < c:
            p += 1
        else:
            cnt += 1
            l = v + k
            p = 1
    print(cnt)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

import numpy as np
import itertools
from itertools import combinations_with_replacement
if __name__ == "__main__":
    # 入力パターン．
    # 先に要素数Nが与えられて，その数読み込むパターン
    ### N
    ### x_1, y_1
    ### ...
    ### x_N, y_N
    N, M, Q = map(int, input().split())
    data = np.array([list(map(int, input().split())) for _ in range(Q)])
    #print(data)
    # A = data[:, 0]
    # B = data[:, 1]
    # C = data[:, 2]
    # D = data[:, 3]
    #print("B {}".format(len(B.shape)))

    # 1, 2, ..., M から重複を許してN個取り出す（ソート済み）
    arr = list(combinations_with_replacement(range(1, M+1), N))
    ans = 0
    for a in arr:
        #print(a)
        s = 0
        for i in range(Q):
            if a[data[i, 1]-1] - a[data[i, 0]-1] == data[i, 2]:
                s += data[i, 3]
        if s > ans:
            ans = s
    print(ans)





### FIXED CODE ###

import numpy as np
import itertools
from itertools import combinations_with_replacement
if __name__ == "__main__":
    N, M, Q = map(int, input().split())
    #data = np.array([list(map(int, input().split())) for _ in range(Q)])
    data = [list(map(int, input().split())) for _ in range(Q)]
    #print(data)
    # A = data[:, 0]
    # B = data[:, 1]
    # C = data[:, 2]
    # D = data[:, 3]
    #print("B {}".format(len(B.shape)))

    # 1, 2, ..., M から重複を許してN個取り出す（ソート済み）
    arr = combinations_with_replacement(range(1, M+1), N)
    ans = 0
    for a in arr:
        #print(a)
        s = 0
        # for i in range(Q):
        #     if a[data[i, 1]-1] - a[data[i, 0]-1] == data[i, 2]:
        #         s += data[i, 3]
        for d in data:
            if a[d[1]-1] - a[d[0]-1] == d[2]:
                s += d[3] 

        if s > ans:
            ans = s
    print(ans)
### BUGGY CODE ###

N = int(input())

def func(n):
    cnt = 0
    for x in range(1, 34):
        for y in range(1, 34):
            for z in range(1, 34):
                if(x**2+y**2+z**2+x*y+y*z+z*x > n):
                    break
                elif(x**2+y**2+z**2+x*y+y*z+z*x == n):
                    cnt += 1
                    break
    return cnt

for i in range(1, N+1):
    print(func(i))

### FIXED CODE ###

def func(n):
    cnt = 0
    a = int(n**0.5)
    for x in range(1, a+1):
        for y in range(x, a+1):
            z = y
            while(x**2+y**2+z**2+x*y+y*z+z*x <= n):
                if(x**2+y**2+z**2+x*y+y*z+z*x == n):
                    if(x == y == z):
                        cnt += 1
                    elif(x != y and y != z and z != x):
                        cnt += 6
                    else:
                        cnt += 3    
                    break
                z += 1
    return cnt

N = int(input())
    
for i in range(1, N+1):
    print(func(i))
### BUGGY CODE ###

import sys

def JudgeLunLun(num):
  val = num
  next = 0
  if num <= 12:
    val = num
  else:
    # 真面目なルンルン数判定。配列に1文字ずつ格納して全桁ループ処理して判定
    # 加算処理に備えて文字として扱う
    A = list(str(num))
    for i in range(len(A)-1):
      if abs(int(A[i])-int(A[i+1])) > 1:
        val = 0
        head = ''.join(A[:i+1])
        body = str(int(A[i+1]) +1)
        tail = '0' * (len(A) - (i+2))
        if body == '10':
          head = str(int(head)+1)
          body = '0'
        # 編集後の値を結合して数値変換して返す
        next = int(head+body+tail)
  
  return val, next

def main():
  K = int(input())
  cnt = 0
  i = 1
  while cnt < K:
    val, next = JudgeLunLun(i)
    # ルンルン数判定
    if val > 0:
      i += 1
      cnt += 1
      if cnt == K:
        break
    else:
      i = next
    
  print(val)

if __name__ == '__main__':
  main()


### FIXED CODE ###

import sys

def JudgeLunLun(num):
  val = num
  next = 0
  if num <= 12:
    val = num
  else:
    # 真面目なルンルン数判定。文字列に変換して1桁毎の処理を行う。
    # 加算処理に備えて文字として扱う
    A = str(num)
    for i in range(len(A)-1):
      if abs(int(A[i])-int(A[i+1])) > 1:
        val = 0
        # A[i+1]が大きい時は、A[i]をカウントアップするしかない。
        if int(A[i]) < int(A[i+1]):
          head = str(int(A[:i+1])+1)
          body = '0'
          tail = '0' * (len(A) - (i+2))
        else:
          if int(A[i]) - int(A[i+1]) > 2:
            head = A[:i+1]
            body = str(int(A[i]) -1)
            tail = '0' * (len(A) - (i+2))            
          else:
            head = A[:i+1]
            body = str(int(A[i+1]) +1)
            tail = '0' * (len(A) - (i+2))
            if body == '10':
              head = str(int(head)+1)
              body = '0'
        
        # 編集後の値を結合して数値変換して返す
        next = int(head+body+tail)
  
  return val, next

def main():
  K = int(input())
  cnt = 0
  i = 1
  while cnt < K:
    val, next = JudgeLunLun(i)
    # ルンルン数判定
    if val > 0:
      i += 1
      cnt += 1
      if cnt == K:
        break
    else:
      i = next
    
  print(val)

if __name__ == '__main__':
  main()
### BUGGY CODE ###

import numpy as np

N, W = map(int, input().split())
WV = np.array([list(map(int, input().split())) for i in range(N)])

dp = np.zeros((N+1, W+1), dtype=np.int)
for n in range(1, N + 1):
    for w in range(1, W+1):
        if w >= WV[n-1][0]:
        # weight = max(w-WV[n-1][0], 0)
            dp[n][w] = max(dp[n-1][w-WV[n-1][0]] + WV[n-1][1], dp[n-1][w])
        else:
            dp[n][w] = dp[n-1][w]

print(dp[-1][-1])


### FIXED CODE ###

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

dp = [[0]*(W+1) for i in range(N+1)]
for n in range(1,N+1):
    for w in range(1,W+1):
        if w >= WV[n-1][0]:
            dp[n][w] = max(dp[n-1][w-WV[n-1][0]] + WV[n-1][1], dp[n-1][w])
        else:
            dp[n][w] = dp[n-1][w]
print(dp[-1][-1])
### BUGGY CODE ###

from math import factorial
N, A, B = map(int, input().split())
MOD = 10 ** 9 + 7

def calc(n):
    ret = 1
    for i in range(n):
        ret *= (N - i) % MOD
    return ret * pow(factorial(n), MOD - 2, MOD) % MOD

print(max(0, (pow(2, N, MOD) - ((calc(A) + calc(B)) % MOD) - 1) % MOD))

### FIXED CODE ###

mod = 10 ** 9 + 7

def calc(n,r):
    x = 1
    y = 1
    for i in range(r):
        x *= n - i
        x %= mod
        y *= i + 1
        y %= mod
    return x * pow(y, mod - 2, mod) % mod

n, a, b = map(int, input().split())
res = pow(2, n, mod) - 1
 
for i in [a, b]:
    res -= calc(n, i)
print(res % mod)
### BUGGY CODE ###

query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0
    for i in range(1, x + 1):
        out = out + (1 / x) * i

    return out


final = 0.0
answer=list()
for i in range(0, N):
    final=0.0
    for j in range(i, K+i):
        if K+i<=N:
            div = L[j]
            final = final + prob(div)
    answer.append(final)
print("%14.12f"%max(answer))

### FIXED CODE ###

query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0

    out = (x+1)/2

    return out


# final = 0.0
# answer=list()
# for i in range(0, N):
#     final=0.0
#     for j in range(i, K+i):
#         if K+i<=N:
#             div = L[j]
#             final = final + prob(div)
#     answer.append(final)
#
# print("%14.12f"%max(answer))


res=0.0
tres=0.0
for i in range(0,K):
    tres+=prob(L[i])
    res=max(res,tres)
rindex=K
lindex=0
while rindex<N:
    tres=tres-prob(L[lindex])+prob(L[rindex])
    rindex+=1
    res=max(res,tres)
    lindex+=1
print("%14.12f"%res)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

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

end=[[] for i in range(N+2)]
LIST=set()#更新が必要な座標を選ぶ

for i in [0]*M:
    l,r,a=map(int,input().split())
    end[r+1].append((l,a))
    LIST.add(r)
    LIST.add(r+1)

#Starry Sky tree
seg_el=1<<18#Segment treeの台の要素数

SEG=[0]*(2*seg_el-1)#Segment tree.色々考えると0で初期化してOKそう
ADD=[0]*(2*seg_el-1)#加算用Segment tree,SEG[k]+ADD[k]がkにおける本当の最大値

def updates(a,b,x,k,l,r):#区間[a,b)にxを加算
    
    if r<=a or b<=l:#区間[a,b)が対象区間の外にあれば終了
        return
    
    if a<=l and r<=b:
        ADD[k]+=x#そのノードのADD値を更新
        return
    
    updates(a,b,x,k*2+1,l,(l+r)//2)#それ以外のときは,SEG[k*2+1]とSEG[k*2+2]で場合分け
    updates(a,b,x,k*2+2,(l+r)//2,r)

    SEG[k]=max(SEG[k*2+1]+ADD[k*2+1],SEG[k*2+2]+ADD[k*2+2])

def update_solo(n,x,seg_el):#A[n]=xに更新（反映）
    i=n+seg_el-1
    SEG[i]=x
    i=(i-1)//2
    
    while i>=0:
        SEG[i]=max(SEG[i*2+1]+ADD[i*2+1],SEG[i*2+2]+ADD[i*2+2])
        i=(i-1)//2

for i in sorted(LIST) :

    for b,x in end[i]:
        updates(b,i,x,0,0,seg_el)#点数がもらえる区間から出たときにその分を加算

    update_solo(i,SEG[0]+ADD[0],seg_el)#[0,i)の最大値はSEG[0]+ADD[0]と一致するはず

print(SEG[0]+ADD[0])


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

end=[[] for i in range(N+2)]

for i in [0]*M:
    l,r,a=map(int,input().split())
    end[r+1].append((l,a))

#Starry Sky tree
seg_el=1<<18#Segment treeの台の要素数

SEG=[0]*(2*seg_el-1)#Segment tree.色々考えると0で初期化してOKそう
ADD=[0]*(2*seg_el-1)#加算用Segment tree,SEG[k]+ADD[k]がkにおける本当の最大値
seg_el_list=[524286, 262142, 131070, 65534, 32766, 16382, 8190, 4094, 2046, 1022, 510, 254, 126, 62, 30, 14, 6, 2, 0]

def update(k):#SEGのkより上のノードを更新（反映）
    while k>=0:
        k=(k-1)//2
        if SEG[k]==max(SEG[k*2+1]+ADD[k*2+1],SEG[k*2+2]+ADD[k*2+2]):
            break
        SEG[k]=max(SEG[k*2+1]+ADD[k*2+1],SEG[k*2+2]+ADD[k*2+2])

def to_seg(a):#aが終点となる区間をSegment treeの座標へ変換  
    b=(a&(-a)).bit_length()
    return seg_el_list[b]+a//(1<<(b-1))

def add(a,b,x):#区間(a,b]にxを加算
    #print(a,b,x)
    while b!=0:
        ADD[to_seg(b)]+=x
        update(to_seg(b))
        b-=(b&(-b))

    while a!=0:
        ADD[to_seg(a)]+=-x
        update(to_seg(a))
        a-=(a&(-a))
    
for i in range(N+2):
    for b,k in end[i]:
        add(b,i,k)#点数がもらえる区間から出たときにその分を加算

    SEG[i+seg_el-1]=SEG[0]
    update(i+seg_el-1)

print(SEG[0])
### BUGGY CODE ###

import sys
from collections import Counter
from collections import deque
import math
import fractions
import bisect
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,m=mp()
l=[lmp() for i in range(n)]
l.append([10**6,10**6])
val=[]
ans=0
l=sorted(l,key=lambda x: x[0],reverse=True)
for i in range(1,m+1):
    while l[-1][0]==i:
        q=l.pop()
        val.append(q[1])
    val.sort()
    if len(val):
        ans+=val.pop()
print(ans)

### FIXED CODE ###

import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,m=mp()
l=[lmp() for i in range(n)]
l.append([10**6,10**6])
val=[]
heapq.heapify(val)
ans=0
c=0
l=sorted(l,key=lambda x: x[0],reverse=True)
for i in range(1,m+1):
    while l[-1][0]==i:
        q=l.pop()
        heapq.heappush(val,(-1)*q[1])
        c+=1
    if c>0:
        ans-=heapq.heappop(val)
        c-=1
print(ans)
### BUGGY CODE ###

# import numpy as np

# aとbの最大公約数
def GCD(a,b):
    # ユークリッドの互除法
    if b == 0:
        return a
    else:
        return GCD(b,a % b)



k = int(input())
sum = 0

for i in range(1, k + 1):
    for j in range(1, k + 1):
        for k in range(1, k + 1):
            sum = sum + GCD(GCD(i, j),k)
print(sum)

### FIXED CODE ###

# import numpy as np

# aとbの最大公約数
def GCD(a,b):
    # ユークリッドの互除法
    if b == 0:
        return a
    else:
        return GCD(b,a % b)



k = int(input())
sum = 0
count = [0] * k

for i in range(1, k + 1):
    for j in range(1, k + 1):
        count[GCD(i, j) - 1] += 1

# print(count)
for i in range(1, k + 1):
    for j, n in enumerate(count):
        sum = sum + GCD(i, j + 1) * n
print(sum)
### BUGGY CODE ###

import re
prog = re.compile('AC')
N, Q = [int(x) for x in input().split()]
S = input()
for _ in range(Q):
  l, r = [int(x) for x in input().split()]
  result = prog.findall(S[l-1:r])
  if result:
  	print(len(result))
  else:
    print(0)


### FIXED CODE ###

import numpy as np
def find_AC(S):
  ret = [0]*len(S)
  for i in range(len(S)-1):
    if S[i] == 'A' and S[i+1] == 'C':
      ret[i+1] = 1
  return ret

N, Q = [int(x) for x in input().split()]
S = input()

cum = np.cumsum(find_AC(S))

for _ in range(Q):
  l, r = [int(x) for x in input().split()]
  ans = cum[r-1] - cum[l-1]
  print(ans)
### BUGGY CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    s = 0
    while N:
        s += N%10
        N //= 10
    if s%9 == 0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = input()
    s = 0
    for i in range(len(N)):
        s += int(N[i])
    if s%9 == 0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()
### BUGGY CODE ###

from collections import Counter

input_line=int(input())
count=0
input_list=[]
while count < input_line:
  input_list.append(input())
  count+=1
ans_list=[]
list_set=set(input_list)
max_appeard=Counter(input_list).most_common(1)[0][1]
for item in list_set:
    appeard=Counter(input_list)[item]
    if appeard >= max_appeard:
        max_appeard=appeard
        ans_list.append(item)
ans_list.sort()
for item in ans_list:
  print (item)

### FIXED CODE ###

from collections import defaultdict

H=int(input())
d = defaultdict(int)
for _ in range(H):
    d[input()] += 1
max_appeard=max(d.items(), key=lambda x: x[1])[1]
ans=[k for k,v in d.items() if v == max_appeard]
ans.sort()
for item in ans:
  print (item)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

# K+1 - x でうつす -> i と 2K+2-i は同じ

MOD = 998244353
U = 10000
fact = [1] * (U+1)
fact_inv = [1] * (U+1)
for n in range(1,U+1):
    fact[n] = fact[n-1] * n % MOD
fact_inv[n] = pow(fact[n], MOD-2, MOD)
for n in range(U,0,-1):
    fact_inv[n-1] = fact_inv[n] * n % MOD

def comb(n,k):
    if not (0 <= k <= n):
        return 0
    return fact[n] * fact_inv[k] * fact_inv[n-k] % MOD

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

def F(x,y,N):
    # 片方しか取れないものが x ペア
    # 自由に使える枠が y ある
    n = min(x, N)
    # x ペア から、iペア使う
    cnt = 0
    for i in range(n+1):
        t = comb(x,i) # どの i ペアを使うか
        t *= pow(2,i,MOD) # i ペアのうちどっちを使うか
        # とりあえず1つずつ使う
        # あとは、a1+a2+...+a_{i+y} = N-i, a_j >= 0
        t *= comb(N+y-1,i+y-1)
        cnt += t
    cnt %= MOD
    return cnt

answer = []
for S in range(2,K+2):
    if S & 1:
        x = F((S-1)//2, K - S + 1, N)
    else:
        x = F((S-1)//2, K - S + 1, N) + F((S-1)//2, K - S + 1, N - 1)
    answer.append(x % MOD)

answer += answer[:-1][::-1]

print('\n'.join(map(str,answer)))



### FIXED CODE ###

import sys
input = sys.stdin.readline

# K+1 - x でうつす -> i と 2K+2-i は同じ

MOD = 998244353
U = 10000
fact = [1] * (U+1)
fact_inv = [1] * (U+1)
for n in range(1,U+1):
    fact[n] = fact[n-1] * n % MOD
fact_inv[n] = pow(fact[n], MOD-2, MOD)
for n in range(U,0,-1):
    fact_inv[n-1] = fact_inv[n] * n % MOD

def comb(n,k):
    if not (0 <= k <= n):
        return 0
    return fact[n] * fact_inv[k] * fact_inv[n-k] % MOD

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

def F(x,y,N):
    n = min(x, N)
    return sum(comb(x,i) * pow(2,i,MOD) * comb(N+y-1,i+y-1) for i in range(n+1)) % MOD

answer = []
for S in range(2,K+2):
    if S & 1:
        x = F((S-1)//2, K - S + 1, N)
    else:
        x = F((S-1)//2, K - S + 1, N) + F((S-1)//2, K - S + 1, N - 1)
    answer.append(x % MOD)

answer += answer[:-1][::-1]

print('\n'.join(map(str,answer)))
### BUGGY CODE ###

import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
s = 1
for i in range(n):
    s *= a[i]
print(s if s <= 10**18 else -1)

### FIXED CODE ###

import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
s = 1
a.sort()
for i in range(n):
    s *= a[i]
    if s > 10**18:
        print(-1)
        exit()
print(s)
### BUGGY CODE ###

N = int(input())
A = list(map(int,input().split()))
mod = 10**9+7
ans = 0
for i in range(N):
    for j in range(i,N):
        ans += (A[i]^A[j])%mod
print(ans%mod)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
mod = 10**9+7
ans = 0

for bit in range(60):
    m = 1 << bit
    # bit桁目のbitが立っている時の数
    c = sum(a&m for a in A) >> bit
    # bit桁目の1の合計
    ans += (c*(N-c))<<bit
    # 繰り上がりのない足し算
    ans %= mod
print(ans)
### BUGGY CODE ###

#!/usr/bin/env python3

s = input()
n = len(s)
ans = 0 
arr = []

# calc
for i in range(n+1):
    # right direction
    rcnt = 0 
    for j in range(i, n): 
        if s[j] == '>':
            rcnt += 1
        else:
            break
    # left direction
    lcnt = 0 
    for j in reversed(range(i)):
        if s[j] == '<':
            lcnt += 1
        else:
            break
    arr.append(max(rcnt, lcnt))
    ans += max(rcnt, lcnt)
#print(arr)
print(ans)


### FIXED CODE ###

#!/usr/bin/env python3

s = input()
n = len(s)+1
a = [0 for _  in range(n)]

for i in range(n-1):
    if s[i] == '<':
        a[i+1] = max(a[i+1], a[i]+1)

for i in reversed(range(1, n)):
    if s[i-1] == '>':
        a[i-1] = max(a[i-1], a[i]+1)

ans = sum(a)

#print('a = ', a)
print(ans)