Harryxun/stf_run huggingface dataset:
import sys

a = [[0] * 3 for _ in range(3)]
a[0] = list(map(int, sys.stdin.readline().strip().split()))
a[1] = list(map(int, sys.stdin.readline().strip().split()))
a[2] = list(map(int, sys.stdin.readline().strip().split()))
n = int(sys.stdin.readline().strip())
b = [0] * n
for i in range(n):
    b[i] = int(sys.stdin.readline().strip())

    for row in range(3):
        for col in range(3):
            if a[row][col] == b[i]:
                a[row][col] = 0


def is_bingo(grid):
    # horizontal
    for row in range(3):
        if a[row][0] == a[row][1] == a[row][2] == 0:
            return True
    # vertical
    for col in range(3):
        if a[1][col] == a[2][col] == a[3][col] == 0:
            return True

    if a[0][0] == a[1][1] == a[2][2] == 0:
        return True
    if a[2][0] == a[1][1] == a[0][2] == 0:
        return True

    return False


if is_bingo(a):
    print('Yes')
else:
    print('No')




### FIXED CODE ###

import sys

a = [[0] * 3 for _ in range(3)]
a[0] = list(map(int, sys.stdin.readline().strip().split()))
a[1] = list(map(int, sys.stdin.readline().strip().split()))
a[2] = list(map(int, sys.stdin.readline().strip().split()))
n = int(sys.stdin.readline().strip())
b = [0] * n
for i in range(n):
    b = int(sys.stdin.readline().strip())

    for row in range(3):
        for col in range(3):
            if a[row][col] == b:
                a[row][col] = 0


def is_bingo():
    # horizontal
    for r in range(3):
        if a[r][0] + a[r][1] + a[r][2] == 0:
            return True
    # vertical
    for c in range(3):
        if a[0][c] + a[1][c] + a[2][c] == 0:
            return True

    if a[0][0] + a[1][1] + a[2][2] == 0:
        return True
    if a[2][0] + a[1][1] + a[0][2] == 0:
        return True

    return False


if is_bingo():
    print('Yes')
else:
    print('No')
n=int(input())
array=[]
for i in range(2,n+1):
    s=i
    while s!=1:
        turn=0
        for j in range(2,s+1):
            if s%j==0:
                s=s//j
                array.append(j)
                break
ans=1
import collections
c=collections.Counter(array)
l=list(c.values())
print(l)
for i in range(len(l)):
    ans*=l[i]+1
print(ans%(10**9+7))
 

### FIXED CODE ###

A,B,C,D=map(int,input().split())
print(max(A*B,C*D))
N, X = map(int, input().split())
*L, = map(int, input().split())
ans = 0
d = 0
while ans < N and d <= X:
    ans += 1
    d += L[ans]
if d <= X:
    ans += 1
print(ans)


### FIXED CODE ###

N, X = map(int, input().split())
*L, = map(int, input().split())
ans = 1
d = 0
for l in L:
    if d + l <= X:
        ans += 1
        d += l
    else:
        break
print(ans)
A, B, C = map(int, input().split())
if A == B == C:
    print(0 if A%2 else -1)
else:
    cnt = 0
    while A%2==0 and B%2==0 and C%2==0:
        A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
        cnt += 1
    print(cnt)


### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
    print('Yes')
else:
    print('No')
from math import gcd

def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

N = int(input())
A = [0] + list(map(int, input().split()))

toRight = [0]*(N+1)
toRight[1] = A[1]
for i in range(2, N+1):
    toRight[i] = gcd(toRight[i-1], A[i])

toLeft = [0]*(N+1)
toLeft[N] = A[N]
for i in reversed(range(1, N)):
    toLeft[i] = gcd(toLeft[i+1], A[i])
    
ans = max(toRight[-2], toLeft[2])
for i in range(3, N-3 + 1):
    now = gcd(toRight[i-1], toLeft[-i-1])
    ans = max(ans, now)

print(ans)


### FIXED CODE ###

def gcd(a, b):  # a >= b
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

N = int(input())
A = [0] + list(map(int, input().split()))

toRight = [0]*(N+1)
toRight[1] = A[1]
for i in range(2, N+1):
    toRight[i] = gcd(toRight[i-1], A[i])

toLeft = [0]*(N+1)
toLeft[N] = A[N]
for i in reversed(range(1, N)):
    toLeft[i] = gcd(toLeft[i+1], A[i])

# print(toRight)
# print(toLeft)
    
ans = max(toRight[-2], toLeft[2])
for i in range(2, N-1 + 1):
    now = gcd(toRight[i-1], toLeft[i+1])
    ans = max(ans, now)

print(ans)
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
def tr(x):
    if "DEBUG" in globals(): sys.stderr.write(f"{x}\n")

x = ni()
if x == 1:
    print("Hello World")
else:
    a, b = na()
    print(a+b)


### FIXED CODE ###

import sys

stdin = sys.stdin

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

x = ni()
if x == 1:
    print("Hello World")
else:
    a = ni()
    b = ni()
    print(a+b)
import sys

input = sys.stdin.readline

n = int(input())
y = str(input())
ones = 0
for i in y:
    if i == '1': ones += 1
x = int(y, 2)

def get(z):
    ret = 0
    while z > 0:
        if z % 2 == 1:
            ret += 1
        z //= 2
    return ret

out = []
for i in range(n):
    tmp = (1 << i) * -1
    o = ones - 1
    if y[n - i - 1] == '0':
        tmp = 1 << i
        o = ones + 1

    tmp = tmp + x
    if tmp == 0:
        out.append(0)
    cnt = 1
    tmp %= o
    while tmp > 0:
        tmp %= get(tmp)
        cnt += 1

    out.append(cnt)

for i in range(n):
    print(out[n-i-1])


### FIXED CODE ###

import sys

input = sys.stdin.readline

n = int(input())
y = str(input())
# n = 10**5
# y  = '1' * n
ones = 0
for i in y:
    if i == '1': ones += 1
x = int(y, 2)

def get(z):
    ret = 0
    while z > 0:
        if z % 2 == 1:
            ret += 1
        z //= 2
    return ret

out = []
rem1 = -1
rem2 = -1
if ones > 1:
    rem1 = x % (ones - 1)
if ones < n:
    rem2 = x % (ones + 1)

def calc(p, m):
    if p <= 2:
        return (1 << p) % m
    a = p // 2
    ret = calc(a, m)
    ret = (ret * ret) % m
    if p % 2 == 1:
        ret = (ret * 2) % m
    return ret



for i in range(n):
    # tmp = (1 << i) * -1
    o = ones - 1
    if y[n - i - 1] == '0':
        # tmp = 1 << i
        o = ones + 1

    # tmp = tmp + x
    if o == 0:
        out.append(0)
        continue
    if o == 1:
        out.append(1)
        continue


    if o > ones:
        tmp = (rem2 % o + calc(i, o)) % o
    else:
        tmp = (rem1 % o - calc(i, o) + o) % o


    cnt = 1
    while tmp > 0:
        tmp %= get(tmp)
        cnt += 1

    out.append(cnt)

for i in range(n):
    print(out[n-i-1])
n,k=map(int,input().split())
n,mod=n-k+1,pow(10,9)+7

fact,inv,factinv=[0]*(n+1),[0]*(n+1),[0]*(n+1)
fact[0],fact[1]=1,1
inv[1]=1
factinv[0],factinv[1]=1,1

for i in range(2,n+1):
  fact[i]=(fact[i-1]*i)%mod
  inv[i]=mod-(inv[mod%i]*(mod//i))%mod               
  factinv[i]=(factinv[i-1]*inv[i])%mod      
    
def comb(n,r,mod):
  r = min(r,n-r)
  return fact[n] * factinv[r] * factinv[n-r] % mod
  
for i in range(1,k+1):
  ans=comb(n,i,mod)*comb(k-1,i-1,mod)%mod
  print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
mod=pow(10,9)+7

fact,inv,factinv=[0]*(n+1),[0]*(n+1),[0]*(n+1)
fact[0],fact[1],inv[1]=1,1,1
factinv[0],factinv[1]=1,1

for i in range(2,n+1):
  fact[i]=(fact[i-1]*i)%mod
  inv[i]=mod-(inv[mod%i]*(mod//i))%mod               
  factinv[i]=(factinv[i-1]*inv[i])%mod      
    
def comb(n,r,mod):
  if r<0 or n<r:
    return 0
  r=r if r<=n-r else n-r
  return fact[n]*factinv[r]*factinv[n-r]%mod
  
for i in range(1,k+1):
  ans=comb(n-k+1,i,mod)*comb(k-1,i-1,mod)%mod
  print(ans)
n = input()
answer = 1
for i in range(int(n)):
    a = int(input())
    answer = answer * a
    if answer > 10**18:
        print("-1")
        break
print(answer)

### FIXED CODE ###

a,b = input().split()
print(int(a) * int(b))
n = int(input())
a = [int(i) for i in input().split()]
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if n == 1:
    ans = 1
else:
    l = a[0]
    for i in a[1:]:
        l = lcm(l, i)
    b = []
    for i in a:
        b.append(l//i)
    ans = sum(b) % (10 ** 9 + 7)
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)
def lcm(x, y):
    return (x * y) // gcd(x, y)

l = a[0]
for i in a[1:]:
    l = lcm(l, i)
b = []
for i in a:
    b.append(l//i)
ans = sum(b) % (10 ** 9 + 7)
print(ans)
# union-find
# https://note.nkmk.me/python-union-find/

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
        # 各要素の親要素を格納する

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        # if x > y:
        if self.parents[x] > self.parents[y]:
            self.parents[x] += self.parents[y]
            self.parents[y] = x
            return
        self.parents[y] += self.parents[x]   
        self.parents[x] = y
        return
    
    def size(self, x):
        x = self.find(x)    
        return self.parents[x]*(-1)

def main():
    n, m = map(int, input().split())
    friend = UnionFind(n)

    for _ in range(m):
        a, b = map(int, input().split())
        friend.union(a-1, b-1)
    
    ans = 0
    for i in range(n):
        ans = max(ans, friend.size(i))
    print(ans)

if  __name__ == "__main__":
     main()


### FIXED CODE ###

# union-find
# https://note.nkmk.me/python-union-find/

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
        # 各要素の親要素を格納する

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            return self.find(self.parents[x])
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
        return
    
    def size(self, x):
        x = self.find(x)    
        return self.parents[x]*(-1)

def main():
    n, m = map(int, input().split())
    friend = UnionFind(n)

    for _ in range(m):
        a, b = map(int, input().split())
        friend.union(a-1, b-1)
    
    ans = 0
    for i in range(n):
        ans = max(ans, friend.size(i))
    print(ans)

if  __name__ == "__main__":
     main()
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n, k = map(int, input().split())
a = list( map(int, input().split()))
p = 10**9+7

a.sort()

from bisect import bisect_left, bisect_right
zerostart = bisect_left(a, 0)
posstart = bisect_right(a, 0)

aneg = a[:zerostart]
cntzero = posstart - zerostart
apos = a[posstart:]

cntneg = len(aneg)
cntpos = len(apos)

# 答えが0になる時
if k > n-cntzero:
    print(0)
    exit()

cntneg = len(aneg)
cntpos = len(apos)

mix = [(-neg,-1) for neg in aneg] + [(pos,1) for pos in apos]
mix.sort(key=lambda x:x[0],reverse=True)


# 答えが正になる時
if k <= cntpos or (k%2==0 and  k <= (cntneg//2)*2 + cntpos) or (k%2==1 and cntpos%2==1 and k <= (cntneg//2)*2 + cntpos-1):
    pos_pair_mix=[]
    apos.sort(reverse=True)
    for i in range(cntpos//2):
        pos_pair_mix.append((apos[2*i]*apos[2*i+1],+1,i))

    for i in range(cntneg//2):
        pos_pair_mix.append((aneg[2*i]*aneg[2*i+1],-1,i))

    pos_pair_mix.sort(key=lambda x:x[0],reverse=True)

    ans = 1
    last_apos=0

    for i in range(k//2):
        ans*=pos_pair_mix[i][0]%p
        ans%=p
        if pos_pair_mix[i][1]==1:
            last_apos = pos_pair_mix[i][2]+1
    if k%2==0:
        print(ans%p)
        exit()
    else:
        print((ans*apos[last_apos])%p)
        exit()

# 答えが負になる時
mix = [(neg,-neg,-1) for neg in aneg] + [(pos,,pos,1) for pos in apos]
mix.sort(key=lambda x:x[1])

ans = 1
for i in range(k-cntzero):
    ans*=mix[i][0]
    ans%=p

if ans <0 and cntzero>0:
    ans = 0

print(ans%p)


### FIXED CODE ###


import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n, k = map(int, input().split())
a = list( map(int, input().split()))
p = 10**9+7

a.sort()

from bisect import bisect_left, bisect_right
zerostart = bisect_left(a, 0)
posstart = bisect_right(a, 0)

aneg = a[:zerostart]
cntzero = posstart - zerostart
apos = a[posstart:]

cntneg = len(aneg)
cntpos = len(apos)

# 答えが0になる時
if k > n-cntzero:
    print(0)
    exit()

# 答えが正になる時
if k <= cntpos or (k%2==0 and  k <= (cntneg//2)*2 + cntpos) or (k%2==1 and cntpos%2==1 and k <= (cntneg//2)*2 + cntpos-1):
    pos_pair_mix=[]

    apos.sort(reverse=True)
    for i in range(cntpos//2):
        pos_pair_mix.append((apos[2*i]*apos[2*i+1],+1,2*i))

    for i in range(cntneg//2):
        pos_pair_mix.append((aneg[2*i]*aneg[2*i+1],-1,2*i))

    pos_pair_mix.sort(key=lambda x:x[0],reverse=True)

    ans = 1
    i_last_apos=0

    for i in range(k//2):
        ans*=pos_pair_mix[i][0]%p
        ans%=p
        if pos_pair_mix[i][1]==1:
            i_last_apos = pos_pair_mix[i][2]+2

    if k%2==0:
        print(ans%p)
        exit()
    else:
        print((ans*apos[i_last_apos])%p)
        exit()

# 答えが負になる時
a.sort(key=lambda x:abs(x) )

ans = 1
for i in range(k):
    ans*=a[i]
    ans%=p

print(ans%p)
d,n = map(int,input().split())

if n == 100:
    a = 99

m = 100 ** d
print(a * m)

### FIXED CODE ###

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

if n == 100:
    a = 101
else:
    a = n

m = 100 ** d
print(a * m)
N = int(input())

chars = "0abcdefghijklmnopqrstuvwxyz"
a = ""
n_1 = N

while True:
    x = n_1 % 26

    if x == 0:
        x = 26

    a += chars[x]
    n_1 -= x
    if n_1 == 0:
        break

    n //= 26

print(a[::-1])

### FIXED CODE ###

n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  

n_rem = n  
res = ""

while True:
    x = n_rem % 26
   
    if x == 0:
        x = 26
    res += chars[x]

    
    n_rem -= x

    
    if n_rem == 0:
        break

    n_rem //= 26


print(res[::-1])
(n,),*t=[map(int,t.split())for t in open(0)]
n+=1
*e,=eval('[],'*n)
q=[n]
f=[-1]*n
for v,w,c in t:e[v]+=w*n+c,;e[w]+=v*n+c,
for v in q:
 f[v//n]=v%n&1
 for w in e[v//n]:q+=[w+v%n]*(f[w//n]<0)
print(*f[1:])

### FIXED CODE ###

from collections import*
n,*t=map(int,open(0).read().split())
e=[[]for _ in range(n)]
for v,w,c in zip(t[::3],t[1::3],t[2::3]):
  e[v-1].append((w-1,c))
  e[w-1].append((v-1,c))
q=deque([(0,0)])
f=[0]+[-1]*~-n
while q:
  v,c=q.pop()
  for w,d in e[v]:
    if-1<f[w]:continue
    d=(c+d)%2
    f[w]=d
    q.append((w,d))
print(*f)
import copy


def move(C, S):
    newC = copy.copy(C)
    for i, s in enumerate(S):
        if s == "L":
            newC[i - 1] += C[i]
        else:
            newC[i + 1] += C[i]
        newC[i] -= C[i]
        # print(C, newC)
    return newC


def main():
    S = input()
    N = len(S)
    C = [1] * N
    Cs = []
    Cs.append(C)
    init = 0
    cnt = 0
    while True:
        C = move(C, S)
        cnt += 1
        if C in Cs:
            init = Cs.index(C)
            cnt -= init
            Cs = Cs[init - 1:]
            break
        if cnt == 10**5:
            print(' '.join([str(c) for c in Cs[cnt - 1]]))
            return
        Cs.append(C)
    # print(init, cnt)
    # print(Cs)
    print(' '.join([str(c) for c in Cs[(10**100 - init) % cnt + 1]]))


if __name__ == "__main__":
    main()

### FIXED CODE ###

import copy


def move(C, S):
    newC = copy.copy(C)
    for i, s in enumerate(S):
        if s == "L":
            newC[i - 1] += C[i]
        else:
            newC[i + 1] += C[i]
        newC[i] -= C[i]
        # print(C, newC)
    return newC


def main():
    S = input()
    N = len(S)
    C = [0] * N

    odd_cnt, even_cnt = 0, 0
    for i, s in enumerate(S):
        if s == 'R':
            if (i + 1) % 2 == 0:
                even_cnt += 1
            else:
                odd_cnt += 1
        else:
            if (i + 1) % 2 == 0:
                C[i] += even_cnt
                C[i - 1] += odd_cnt
                odd_cnt, even_cnt = 0, 0
            else:
                C[i] += odd_cnt
                C[i - 1] += even_cnt
                odd_cnt, even_cnt = 0, 0
        # print(i, S, odd_cnt, even_cnt, C)

    C = list(reversed(C))
    odd_cnt, even_cnt = 0, 0
    for i, s in enumerate(reversed(S)):
        if s == 'L':
            if (i + 1) % 2 == 0:
                even_cnt += 1
            else:
                odd_cnt += 1
        else:
            if (i + 1) % 2 == 0:
                C[i] += even_cnt
                C[i - 1] += odd_cnt
                odd_cnt, even_cnt = 0, 0
            else:
                C[i] += odd_cnt
                C[i - 1] += even_cnt
                odd_cnt, even_cnt = 0, 0
        # print(i, ''.join(list(reversed(S))), odd_cnt, even_cnt,
        #       list(reversed(C)))

    C = reversed(C)
    print(' '.join([str(c) for c in C]))


if __name__ == "__main__":
    main()
s = input()
while 1:
    result = s.replace("ST", "")
    if result != s:
        s = result
        break
    else: s = result
print len(s)


### FIXED CODE ###

s = raw_input()
T = S = 0
for i in s:
    if i == "T":
        if S: S -= 1
        else: T += 1
    elif i == "S":
        S += 1
print T + S
n, k = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
dp = [float('inf')] * n
dp[0] = 0

for i in range(1, n):
    for j in range(max(i - k, 0), i):
      	np = dp[j] + abs(h[i] - h[j])
        dp[i] = dp[i] if dp[i] < np else np 

print(dp[n - 1])

### FIXED CODE ###

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

INF = 10 ** 18

h = H
dp = [0] * N

for n in range(1, N):
	l, r = max(0, n - K), n
	dp[n] = min([dpl + abs(hl - h[r]) for dpl, hl in zip(dp[l:r], h[l:r])])
	#print(dp)
print(dp[N - 1])
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for aa in a:
  ans[aa-1]+=1
print(ans sep='\n')

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for aa in a:
  ans[aa-1]+=1
for an in ans:
  print(an)
input()
x=0
a=[0]
for i in input():a+=a[-1]+1-2*(i=='D')
print(a)

### FIXED CODE ###

input()
x=0
a=[0]
for i in input():a+=a[-1]+1-2*(i=='D'),
print(max(a))
import math


def main():

    mod = 1000000007
    N = int(input())

    A = [0]
    B = [0]

    for n in range(N):
        a, b = map(int, input().split())
        A.append(a)
        B.append(b)

    calc = dict()

    for i in range(1, N + 1):
        r = math.gcd(A[i], B[i])
        m = 1
        if A[i] * B[i] < 0:
            m = -1

        k1 = (m * abs(A[i] // r), abs(B[i] // r))
        k2 = (-m * abs(B[i] // r), abs(A[i] // r))
        if calc.get(k1):
            calc[k1][0] += 1
        elif not calc.get(k2):
            calc[k1] = [1, 0]

    for i in range(1, N + 1):
        r = math.gcd(A[i], B[i])
        m = 1
        if A[i] * B[i] < 0:
            m = -1

        k2 = (-m * abs(B[i] // r), abs(A[i] // r))
        if calc.get(k2):
            calc[k2][1] += 1

    count = 0
    for k, v in calc.items():
        if not v[0] * v[1] == 0:
            count += v[0] + v[1]

    ans = pow(2, N - count, mod)
    for k, v in calc.items():
        if not v[0] * v[1] == 0:
            comb = (pow(2, v[0]) + pow(2, v[1]) - 1)
            ans = (ans * comb) % mod

    for k, v in calc.items():
        print("{} {}".format(k, v))
    print(ans - 1)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math


def main():

    mod = 1000000007
    N = int(input())

    A = [0]
    B = [0]

    for n in range(N):
        a, b = map(int, input().split())
        A.append(a)
        B.append(b)

    calc = dict()
    non_count = 0

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

        if A[i] == 0 and B[i] == 0:
            non_count += 1
        elif A[i] == 0:
            k = (0, 1)
            if calc.get(k):
                calc[k][0] += 1
            else:
                calc[k] = [1, 0]
        elif B[i] == 0:
            k = (0, 1)
            if calc.get(k):
                calc[k][1] += 1
            else:
                calc[k] = [0, 1]
        else:
            r = math.gcd(A[i], B[i])
            m = 1
            if A[i] * B[i] < 0:
                m = -1
            k1 = (m * abs(A[i] // r), abs(B[i] // r))
            k2 = (-m * abs(B[i] // r), abs(A[i] // r))
            if calc.get(k1):
                calc[k1][0] += 1
            elif not calc.get(k2):
                calc[k1] = [1, 0]
            else:
                calc[k2][1] += 1

    N = N - non_count

    count = 0
    for k, v in calc.items():
        if not v[0] * v[1] == 0:
            count += v[0] + v[1]

    ans = pow(2, N - count, mod)
    for k, v in calc.items():
        if not v[0] * v[1] == 0:
            comb = (pow(2, v[0]) + pow(2, v[1]) - 1)
            ans = (ans * comb) % mod

    print((ans - 1 + non_count) % mod)


if __name__ == '__main__':
    main()
n, x, y = map(int, input().split())

ans = {}
for i in range(n-1):
  ans[i+1] = 0
  
for i in range(n):
  for j in range(i+1,n):
    if i <= x-i:
      if j <= x-1:
      	t=j-i
      	ans[t] += 1
      elif j <= y-1:
      	t = min(j-i, (x-1)-i + 1 + (y-1) -j)
      	ans[t] += 1
      else: #j > y-1
      	t = (x-1)-i + 1 + j -(y-1)
      	ans[t] += 1
    elif i < y-1:
      if j < y-1:
      	t = min(j-i, i-(x-1) + 1 + (y-1) -j)
      	ans[t] += 1
      else: #j >= y-1:
      	t = min(j-i, i-(x-1) + 1 + j - (y-1))
      	ans[t] += 1
    elif i >= y-1:
      t=j-i
      ans[t] += 1
    else:
      print("error")

for i in range(1,n):
  print(ans[i])

### FIXED CODE ###

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

ans = {}
for i in range(n-1):
  ans[i+1] = 0
  
for i in range(n):
  for j in range(i+1,n):
    if i <= x-1:
      if j <= x-1:
      	t=j-i
      	ans[t] += 1
      elif j <= y-1:
      	t = min(j-i, (x-1)-i + 1 + (y-1) -j)
      	ans[t] += 1
      else: #j > y-1
      	t = (x-1)-i + 1 + j -(y-1)
      	ans[t] += 1
    elif i < y-1:
      if j < y-1:
      	t = min(j-i, i-(x-1) + 1 + (y-1) -j)
      	ans[t] += 1
      else: #j >= y-1:
      	t = min(j-i, i-(x-1) + 1 + j - (y-1))
      	ans[t] += 1
    elif i >= y-1:
      t=j-i
      ans[t] += 1
    else:
      print("error")

for i in range(1,n):
  print(ans[i])