Harryxun/stf_run huggingface dataset:
N = int(input())
A = int(input())
B = int(input())

if N == 1:
    print("Hello World")
else:
    print(A + B)

### FIXED CODE ###

N = int(input())


if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)
d=input()
print(d.repalace('7/','8/'))

### FIXED CODE ###

d=input()
print(d.replace('7/','8/'))
import math
def primes(n):
    a = list(range(2, n+1))
    primes = [2]
    for i in a:
        flag = True
        m = math.sqrt(i)
        for j in primes:
            if j > m:
                break
            else:
                if i % j == 0:
                    flag = False
                    break
        if flag:
            primes.append(i)
    return primes
primes = primes(10**5)
dp = [0]*(10**5+1)
cnt = 0
for i in range(1, 10**5+1, 2):
    if i in primes:
        if (i+1)//2 in primes:
            cnt += 1
    dp[i] = cnt
 
    
Q = int(input())
for _ in range(Q):
    l, r = map(int, input().split())
    print(dp[r]-dp[l-2])
import math
def primes(n):
    a = list(range(2, n+1))
    primes = [2]
    for i in a:
        flag = True
        m = math.sqrt(i)
        for j in primes:
            if j > m:
                break
            else:
                if i % j == 0:
                    flag = False
                    break
        if flag:
            primes.append(i)
    return primes
primes = primes(10**5)
dp = [0]*(10**5+1)
cnt = 0
for i in range(1, 10**5+1, 2):
    if i in primes:
        if (i+1)//2 in primes:
            cnt += 1
    dp[i] = cnt

    
Q = int(input())
for _ in range(Q):
    l, r = map(int, input().split())
    print(dp[r]-dp[l-2])
提出情報

### FIXED CODE ###

import math
def primes(n):
    a = list(range(2, n+1))
    primes = [2]
    for i in a:
        flag = True
        m = math.sqrt(i)
        for j in primes:
            if j > m:
                break
            else:
                if i % j == 0:
                    flag = False
                    break
        if flag:
            primes.append(i)
    return primes
primes = primes(10**5)
anss = []
for p in primes:
    if (p+1)//2 in primes:
        anss.append(p)
dp = [0]*(10**5+1)
cnt = 0
for i in range(1, 10**5+1, 2):
    if i in anss:
        cnt += 1
    dp[i] = cnt

    
Q = int(input())
for _ in range(Q):
    l, r = map(int, input().split())
    print(dp[r]-dp[l-2])
alpha = []
for i in range(26):
    alpha.append(0)

while True:
    for char in raw_input().upper():
        if char == '\0':
            break
        if char.isupper():
            alpha[ord(char) - 65] += 1

for i in range(26):
    print chr(i + 97) + " : " + str(alpha[i])

### FIXED CODE ###

import sys

alpha = []
for i in range(27):
    alpha.append(0)

for line in sys.stdin:
    for char in line.upper():
        if char == '\0':
            break
        if char.isupper():
            alpha[ord(char) - 65] += 1

for i in range(26):
    print chr(i + 97) + " : " + str(alpha[i])
n=int(input())
print(n if n%2==0 else 2n)

### FIXED CODE ###

n=int(input())
print(n if n%2==0 else 2*n)
import numpy as np
from collections import Counter

H, W, M = [int(n) for n in input().split()]
h = []
w = []
table = np.zeros((H, W))
for m in range(M):
    tmp = [int(n) for n in input().split()]
    h.append(tmp[0])
    w.append(tmp[1])
    table[tmp[0]-1][tmp[1]-1] = 1

h_counter = Counter(h)
w_counter = Counter(w)

most_common_h_list = []
most_common_w_list = []

most_common_h_count = 0
for k, v in h_counter.most_common():
    if v < most_common_h_count:
        break
    most_common_h_list.append(k)
    most_common_h_count = v

most_common_w_count = 0
for k, v in w_counter.most_common():
    if v < most_common_w_count:
        break
    most_common_w_list.append(k)
    most_common_w_count = v

ans = 0
finished = False
for hh in most_common_h_list:
    if finished:
        break
    for ww in most_common_w_list:
        if table[hh-1][ww-1] == 1:
            tt = most_common_h_count + most_common_w_count - 1
            if tt > ans:
                ans = tt
        else:
            tt = most_common_h_count + most_common_w_count
            if tt > ans:
                ans = tt
            break
            finished = True
            break

print(ans)


### FIXED CODE ###

H, W, M = [int(n) for n in input().split()]
H_freq = [0] * H
W_freq = [0] * W

table = []
for m in range(M):
    h, w = [int(n)-1 for n in input().split()]
    H_freq[h] += 1
    W_freq[w] += 1
    table.append((h, w))

max_h = max(H_freq)
max_w = max(W_freq)
most_freqent_h = [i for i, h in enumerate(H_freq) if h == max_h]
most_freqent_w = [i for i, w in enumerate(W_freq) if w == max_w]

count = 0
for (h, w) in table:
    if H_freq[h] == max_h and W_freq[w] == max_w:
        count += 1

if count < len(most_freqent_h) * len(most_freqent_w):
    print(max_h + max_w)
else:
    print(max_h + max_w - 1)
from collections import deque
from bisect import bisect

S = input()
if len(S) < 4:
  print(0)
else:
  ans = 0
  d = [deque() for _ in range(3)]
  x = 0
  d[x].append(0)
  for i, s in enumerate(S):
    x = (x+int(s))%3
    d[x].append(i+1)
  for m in range(3):
    for s in d[m]:
      eidx = bisect(d[m], s+4)
      while eidx < len(d[m]):
        e = d[m][eidx]
        ans += 1 if int(S[s:e])%2019 == 0 else 0
        eidx += 1
print(ans)


### FIXED CODE ###

S = input()
if len(S) < 4:
  print(0)
else:
  N = len(S)
  x = 0
  d = [0]*2019
  d[0] = 1
  for i, s in enumerate(reversed(S)):
    x = (x+int(s)*pow(10,i,2019))%2019
    d[x] += 1
  print(sum([m*(m-1)//2 for m in d]))
S = input()
if len(S) == 1:
    print('No')
elif len(S) == 2:
    if S[0] == 'h' and S[1] == 'i':
        print('Yes')
    else:
        print('No')
else:
    for i in range(len(S)-2):
        if S[i] == 'h' and S[i + 1] == 'i' and S[i + 2] != 'i':
            print('Yes')
            exit(1)
    print('No')
    

### FIXED CODE ###

S = input()
ans = ''
flag = False
for i in range(5):
    ans += 'hi'
    if ans == S:
        flag = True

print('Yes' if flag else 'No')
p=input;p();k=p();print(sum([2*min(int(i),abs(k-int(i)))for i in p().split()]))

### FIXED CODE ###

p=input;p();k=int(p());print(sum([2*min(i,abs(k-i))for i in map(int,p().split())]))
n = input()
for i in range(n)
  Xs = raw_input()
  Ys = raw_input()
  count = 0
  a = 0
  dp = {}

  for j in range(len(Ys) + 1):
    dp[0][j + 1] = Ys[j] 
  for i in range(len(Xs) + 1):
    dp[i + 1][0] = Xs[i]

  for j in range(1, len(Ys) + 1):
    for i in range(a + 1, len(Xs) + 1):
      if dp[i][0] == dp[0][j]:
         count = count + 1
         a = i 
         break
   
  print count

### FIXED CODE ###

def solve_lcs():
    x = raw_input()
    y = raw_input()
 
    a = len(x)
    b = len(y)
    c1 = [0 for i in range(b+1)]
    for i in range(a):
        e1 = x[i]
        c2 = c1+[]
        for j in range(b):
            if e1 == y[j]:
                c1[j+1] = c2[j] + 1
            elif c1[j+1] < c1[j]:
                c1[j+1] = c1[j]
    return c1[-1]
 
n = input()
for i2 in range(n):
    print solve_lcs()
N =int(input())
A = list(map(int, input().split()))
 
for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        exit()
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b)
s = input()
l = [int(x) for x in input().split()]
a, b = l[0], l[1]
print(max(a+b, max(a-b, a*b)))

### FIXED CODE ###

s = input()
l = [int(x) for x in s.split()]
a, b = l[0], l[1]
print(max(a+b, max(a-b, a*b)))
N, T = list(map(int, input().split()))
can = []
for _ in range(N):
	c, t = list(map(int, input().split()))
	if t <= T:
		can.append(c)

print(min(can))

### FIXED CODE ###

N, T = list(map(int, input().split()))
can = []
for _ in range(N):
	c, t = list(map(int, input().split()))
	if t <= T:
		can.append(c)
 
if len(can) == 0:
	print("TLE")
else:	
	print(min(can))
from collections import deque

n = int(input())
alist = deque()
for i in range(n):
    alist.append(int(input()))

amax = max(alist)
anslist = [amax]*n
if alist.count(amax)>=2:
    for i in anslist:
        print(i)
    exit()

if alist.count(amax)==1:
    maxindex = alist.index(amax)
    del alist[maxindex]
    anslist[maxindex]= max(alist)
    for i in anslist:
        print(i)
    exit()


### FIXED CODE ###


n = int(input())
alist = []
for i in range(n):
    alist.append(int(input()))

amax = max(alist)
anslist = [amax]*n
if alist.count(amax)>=2:
    for i in anslist:
        print(i)
    exit()

if alist.count(amax)==1:
    maxindex = alist.index(amax)
    del alist[maxindex]
    anslist[maxindex]= max(alist)
    for i in anslist:
        print(i)
    exit()
# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for _ in range(N)]
setA = set(A)
tempA = list(setA)
R = sorted(tempA, reverse=True)
max_v = R[0]
max_v2 = R[1]

for i in range(N):
  if A[i] == R[0]:
    print(R[0])
  else:
    print(R[1])


### FIXED CODE ###

# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for _ in range(N)]
setA = set(A)
tempA = list(setA)
R = sorted(tempA, reverse=True)
max_v = R[0]
if len(R) >= 2:
  max_v2 = R[1]
else:
  max_v2 = R[0]
R2 = sorted(A, reverse=True)
if R2[0] == R2[1]:
  signal = 1
else:
  signal = 0
  
for i in range(N):
  if A[i] == max_v and signal == 0:
    print(max_v2)
  else:
    print(max_v)
from bisect import bisect
n, a, b, q = map(int, input().split())

W = [input().split() for i in range(a)]
X = [int(x) for x, c in W]
C = [c for x, c in W]

P = [list(map(int, input().split())) for i in range(b)]
Y = [y for y, h in P] + [n+1]
D = [0]*b

for i in range(b):
    y0, h = P[i]
    y1 = Y[i+1]
    l = y1 - y0
    if y0 < h + l:
        D[i] = y0 - h
    else:
        D[i] = l

Z = [int(input()) for i in range(q)]

idx = 0
S = {}
for i in range(a):
    x = X[i]; c = C[i]
    S[x] = c
    while Y[idx+1] < x: idx += 1
    i = idx
    while Y[0] <= x:
        while x < Y[i]: i -= 1
        y0, h = P[i]; y1 = Y[i+1]
        if h == 0: break
        x = h + ((x - y0) % D[i])
        S[x] = c
ans = []
for z in Z:
    if z not in S:
        i = bisect(Y, z)
        while Y[0] <= z:
            while z < Y[i]: i -= 1
            y0, h = P[i]; y1 = Y[i+1]
            if h == 0: break
            z = h + ((z - y0) % D[i])
            if z in S:
                break
    if z in S:
        ans.append(S[z])
    else:
        ans.append('?')
print(*ans, sep='')

### FIXED CODE ###

from bisect import bisect
n, a, b, q = map(int, input().split())

W = [input().split() for i in range(a)]
X = [int(x) for x, c in W]
C = [c for x, c in W]

P = [list(map(int, input().split())) for i in range(b)]
Y = [y for y, h in P] + [n+1]
D = [0]*b

for i in range(b):
    y0, h = P[i]; y1 = Y[i+1]
    D[i] = min(y0 - h, y1 - y0)

idx = 0
S = {}
for i in range(a):
    x = X[i]; c = C[i]
    S[x] = c
    if x < Y[0]:
        continue
    while Y[idx+1] <= x: idx += 1
    i = idx
    while Y[0] <= x:
        while x < Y[i]: i -= 1
        y0, h = P[i]
        if h == 0: break
        x = h + ((x - y0) % D[i])
        S[x] = c
def check(z):
    if z in S:
        return S[z]
    i = bisect(Y, z)-1
    while Y[0] <= z:
        while z < Y[i]: i -= 1
        y0, h = P[i]
        if h == 0: break
        z = h + ((z - y0) % D[i])
        if z in S:
            return S[z]
    return '?'

Z = (int(input()) for i in range(q))
print(*map(check, Z), sep='')
a,b = map(int,input().split())                                    │abc136  abc138  abc140  abc142  abc144  abc146  abc148
k = a+b                                                           │abc137  abc139  abc141  abc143  abc145  abc147  python
if k%2:                                                           │(base) rrif@rrif-dynabook-T65-EG:~/document/atcoder$ mkdir abc 13
    print('INPOSSIBLE')                                           │5
else:                                                             │(base) rrif@rrif-dynabook-T65-EG:~/document/atcoder$ rm -r abc
    print(k//2) 

### FIXED CODE ###

a,b = map(int,input().split())
k = a+b
if k%2:
    print('IMPOSSIBLE')
else:
    print(k//2)
#!/usr/bin/env python3
import sys

def solve(N: int, u: "List[int]", v: "List[int]", w: "List[int]"):

    nodes = [1]*N
    e = sorted([(ui, vi, wi) for ui, vi, wi in zip(u, v, w)])
    for eu, ev, ew in e:
        if w%2 == 1:
            nodes[ev-1] = nodes[eu-1]*-1
        else:
            nodes[ev-1] = nodes[eu-1]
            

    for n in nodes:
        print((n.color==1)*1)

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    u = [int()] * (N - 1)  # type: "List[int]"
    v = [int()] * (N - 1)  # type: "List[int]"
    w = [int()] * (N - 1)  # type: "List[int]"
    for i in range(N - 1):
        u[i] = int(next(tokens))
        v[i] = int(next(tokens))
        w[i] = int(next(tokens))
    solve(N, u, v, w)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

def solve(N: int, u: "List[int]", v: "List[int]", w: "List[int]"):

    G=[dict() for i in range(N)]
    for i in range(N-1):
        ui,vi,wi=u[i],v[i],w[i]
        G[ui-1][vi-1]=wi
        G[vi-1][ui-1]=wi

    dist = [-1]*N
    p = [0]
    dist[0] = 0

    while (len(p)>0):
        k = p.pop()
        for n in G[k]:
            if dist[n]==-1:
                dist[n] = dist[k] + G[k][n]
                p.append(n)
    
    for x in dist:
        print(x%2)

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    u = [int()] * (N - 1)  # type: "List[int]"
    v = [int()] * (N - 1)  # type: "List[int]"
    w = [int()] * (N - 1)  # type: "List[int]"
    for i in range(N - 1):
        u[i] = int(next(tokens))
        v[i] = int(next(tokens))
        w[i] = int(next(tokens))
    solve(N, u, v, w)

if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
import numpy as np

if __name__ == '__main__':
    A , B = map(int, input().split())

    num = 1
    tap = 0

    if B=1:
        print(0)
        exit()

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)


### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np

if __name__ == '__main__':
    A , B = map(int, input().split())

    num = 1
    tap = 0

    if B==1:
        print(0)
        exit()

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)
N,L = map(int,input().split())

a = 10**6
b = 0
ans = 0


for i in range(1,N+1):
    if abs(L+i-1) < mina:
        mina = abs(L+i-1)
        minb = i
        print(mina)

for i in range(1,N+1):
    if i != minb:
        ans += (L+i-1)

print(ans)




### FIXED CODE ###

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

a = 10**6
b = 0
ans = 0
for i in range(1,N+1):
    if abs(L+i-1) < a:
        a = abs(L+i-1)
        b = i

for i in range(1,N+1):
    if i != b:
        ans += (L+i-1)

print(ans)
N=int(input())
s=[input() for i in range(N)]
s=sorted(s)
s="".join(s)
print(s)

### FIXED CODE ###

N,L=map(int,input().split())
s=[input() for i in range(N)]
s=sorted(s)
s="".join(s)
print(s)
n = int(input())
l = [True]*(10**9+1)
count = 0
stack = [3, 5, 7]
def check(n, k):
  s = str(n)
  if "3" in s and "5" in s and "7" in s:
    return True
  else:
    return False
while len(stack)>0:
  now = stack.pop()
  if l[now]:
    l[now] = False
    if check(now):
      count += 1
    if now < n:
      stack.append(now*10+3)
      stack.append(now*10+5)
      stack.append(now*10+7)
      stack.append(3*10**len(str(now))+now)
      stack.append(5*10**len(str(now))+now)
      stack.append(7*10**len(str(now))+now)
print(count)
      

### FIXED CODE ###

n = int(input())
count = 0
stack = [0]
def check(n):
  s = str(n)
  if "3" in s and "5" in s and "7" in s:
    return True
  else:
    return False
while len(stack)>0:
  now = stack.pop()
  if check(now) and now <= n:
    count += 1
  if now < n:
    stack.append(now*10+3)
    stack.append(now*10+5)
    stack.append(now*10+7)
print(count)
from fractions import Fraction

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


def saikoro(x):
    y = Fraction(1, N)
    kakuritu = 1
    while 1 <= x and x <= K - 1:
        # 表
        x *= 2
        kakuritu *= 0.5
        if (x <= K):
            continue
        elif (x >= K):
            return kakuritu * float(y)
            break


count = 0
for i in range(1, N + 1):
    count += saikoro(i)
print(count)


### FIXED CODE ###

from fractions import Fraction

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

y = Fraction(1, N)


count = 0
for i in range(1, N + 1):
    kakuritu = 1
    while 1 <= i and i <= K - 1:
        i *= 2
        kakuritu /= 2
        if (i <= K):
            continue
        elif (i >= K):
            break
    count += kakuritu
print("{:.12f}".format(count * float(y)))
#　n以下の整数の素数列挙（エラトステネスの篩）
#-------------------------------------------------------------------------
import numpy as np

def eratosthenes(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum
#-------------------------------------------------------------------------
from itertools import accumulate

N = int(input())
L = [0] * N
R = [0] * N
A = eratosthenes(10*5)
B = [0] * 10*5
C = [0] * N

for i in range(10*5):
    if i in A:
        if (i+1)/2 in A:
            B[i] = 1

C = [0] + list(accumulate(B)) #out of rangeの回避

for i in range(N):
    L[i], R[i] = map(int, input().split())
    print(C[R[i]+1]-C[L[i]])

### FIXED CODE ###

from itertools import accumulate
# エラトステネスの篩
# is_prime := 1~nが素数か否か
# table := 2~nのうち素数
def sieve(n):
    is_prime = [True for _ in range(n)]
    is_prime[0] = False

    for i in range(2, n+1):
        if is_prime[i-1]:
            j = 2 * i
            while j <= n:
                is_prime[j-1] = False
                j += i
    table = [i for i in range(1, n+1) if is_prime[i-1]]
    return is_prime, table


Q = int(input())
L = [0]*Q
R = [0]*Q

for i in range(Q):
    L[i], R[i] = list(map(int, input().split()))

max_R = max(R)
is_prime, table = sieve(max_R)

check = [0]*(max_R + 1)
for i in range(0, max_R + 1):
    if (i % 2 == 1):
        if (is_prime[i-1] and is_prime[(i+1)//2-1]):
            check[i] = 1

# 累積和
check = [0] + check
check = list(accumulate(check))

for i in range(Q):
    print(check[R[i] + 1] - check[L[i]])
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(raw_input())
a = map(int, raw_input().split())
ans = min(map(how_many_times_divisible, a))
 
print ans

### FIXED CODE ###

N = int(input())
A = [int(l) for l in input().split()]


count1 = 0
k = 0
while True:
  count2 = 0
  for i in range(N):
      if A[i]/2** k % 2 !=0:
        break
      else:
        count2 += 1
  if count2 == N:
    count1 += 1
  else:
    break
  k += 1

print(count1)
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for i in range(M)]

connect_list = [set() for _ in range(N)]    #繋がっているリスト
root_list = [0]*N
root_list[0] = "Yes"


def do_ranking(now_set):
    global connect_list, root_list
    if len(now_set) == 0:
        return 0
    # next_set = set()
    for j in list(now_set):
        for i in list(connect_list[j-1]):
            if root_list[i-1] == 0:
                root_list[i-1] = j
                # next_set.add(i)
                now_set.add(i)
        now_set.remove(j)
    do_ranking(now_set)


for A, B in AB:
    connect_list[A-1].add(B)
    connect_list[B-1].add(A)

for i in list(connect_list[0]):
    root_list[i-1] = 1
do_ranking(connect_list[0])   #道しるべ作成

for i in root_list:
    print(i)

### FIXED CODE ###

N, M = map(int, input().split())
connect_list = [set() for _ in range(N)]    #繋がっているリスト
for _ in range(M):
    A, B = map(int, input().split())
    connect_list[A-1].add(B)
    connect_list[B-1].add(A)

root_list = [0]*N
root_list[0] = "Yes"

for i in list(connect_list[0]):
    root_list[i-1] = 1
now_set = connect_list[0]
while len(now_set) != 0:
    for j in list(now_set):
        for i in list(connect_list[j-1]):
            if root_list[i-1] == 0:
                root_list[i-1] = j
                now_set.add(i)
        now_set.remove(j)

for i in root_list:
    print(i)
from scipy.special import comb

x,y=map(int,input().split())
s=(2*y-x)/3
t=(2*x-y)/3
if (2*y-x)%3!=0 or (2*x-y)%3!=0:
    print(0)
else:
    a = comb(s+t, t, exact=True)
    print(a%(10**9+7))

### FIXED CODE ###

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result


x,y=map(int,input().split())
s=int((2*y-x)/3)
t=int((2*x-y)/3)
if (2*y-x)%3!=0 or (2*x-y)%3!=0:
    print(0)
elif s<0 or t<0:
    print(0)
else:
    a = cmb(s+t, t)
    print(a%(10**9+7))
n = int(input())

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

indlis = [-1] * (n+1)


for i in range(n):

    if indlis[a[i]] == -1:
        indlis[a[i]] = i

    else:
        L = indlis[a[i]]
        R = i
        break

#print (L,R)
nall = n+1
nsub = 1

for i in range(n+1):

    print ((nall - nsub) % (10 ** 9 + 7))

    nall *= n - i
    nall //= 2+i

    nsub *= n-R+L-i
    nsub //= 1+i


### FIXED CODE ###

#modの掛け算

def modmal(a,b,mod): #a*bをmodを法にして求める

    return a * b % mod


#modの割り算

def moddiv(a,b,mod): #a/bをmodを法にして求める

    return (a * pow(b,mod-2,mod)) % mod


#逆元

def inverse(a,mod): #aのmodを法にした逆元を返す
    return pow(a,mod-2,mod)



#modのn!と、n!の逆元を格納したリストを返す(拾いもの)
#factorialsには[1, 1!%mod , 2!%mod , 6!%mod… , n!%mod] が入っている
#invsには↑の逆元が入っている

def modfac(n, MOD):
 
    f = 1
    factorials = [1]
    for m in range(1, n + 1):
        f *= m
        f %= MOD
        factorials.append(f)
    inv = pow(f, MOD - 2, MOD)
    invs = [1] * (n + 1)
    invs[n] = inv
    for m in range(n, 1, -1):
        inv *= m
        inv %= MOD
        invs[m - 1] = inv
    return factorials, invs


def modnCr(n,r,mod,fac,inv): #上で求めたfacとinvsを引数に入れるべし(上の関数で与えたnが計算できる最大のnになる)

    return fac[n] * inv[n-r] * inv[r] % mod


n = int(input())

dic = {}

a = list(map(int,input().split()))
twonum = None

for i in range(n+1):

    if a[i] not in dic:
        dic[a[i]] = [i]
    else:
        dic[a[i]].append(i)
        twonum = a[i]

mod = 10**9+7
fac,inv = modfac(n+10,mod)

for k in range(n+1):
    
    k += 1
    
    ans = modnCr(n+1,k,mod,fac,inv)

    l = dic[twonum][0]
    r = (n+1) - dic[twonum][1] - 1

    if l+r >= k-1:
        ans -= modnCr(l+r,k-1,mod,fac,inv)

    print (ans % mod)
a,b,x = list(map(int,input_[0].split()))

ans=0
if a!=b:
    A=(a-1)//x
    B=b//x

    ans=B-A

print(ans)

### FIXED CODE ###

a,b,x = list(map(int,input().split()))

ans=0
if a!=b:
    A = (a-1)//x
    B = b//x

    ans = B - A
elif a==0 and b==0:
    ans=1
    
elif a==x and b==x:
    ans=1

print(ans)