CodeEff/ECCO huggingface dataset:
# Original solution
# 2019/05/12
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int, input().split()))

cnt = 0
for i in range(n+1):
    
    rcnt = r * i
    if rcnt > n:
        break
    
    for j in range(n+1):
        gcnt = g * j
        rgcnt = rcnt + gcnt
        if rgcnt > n:
            break

        bcnt = n - rgcnt
        if bcnt % b == 0:
            cnt += 1

print(cnt)


# Optimized solution
# 2019/05/12
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int, input().split()))

# Init
cnt = 0

# Calc
for i in range(n+1):
    rcnt = r * i
    if rcnt > n:
        break
    
    for j in range(n+1):
        rgcnt = rcnt + g * j
        if rgcnt > n:
            break
        bcnt = n - rgcnt
        if bcnt % b == 0:
            cnt += 1
# Output
print(cnt)
# Original solution
# 2020/07/26
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int,input().split()))

ans = 0

# Calc
for ir in range(n+1):
    vr = r * ir 
    if vr > n:
        break

    for ig in range(n+1):
        vg = g * ig 
        if vg > n:
            break
        cb = n - r * ir - vg
        if cb >= 0 and cb % b == 0:
            ans = ans + 1

# Output
print(ans)


# Optimized solution
# 2020/07/26
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int,input().split()))

ans = 0

# Calc
for ir in range(n+1):
    vr = r * ir 
    if vr > n:
        break

    for ig in range(n+1):
        vg = g * ig 
        if vg > n:
            break
        cb = n - vr - vg
        if cb >= 0 and cb % b == 0:
            ans = ans + 1

# Output
print(ans)
# Original solution
# 2020/07/26
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int,input().split()))

ans = 0

# Calc
for ir in range(n+1):
    vr = r * ir 
    if vr > n:
        break

    for ig in range(n+1):
        vg = g * ig 
        if vg > n:
            break
        cb = n - vr - vg
        if cb >= 0 and cb % b == 0:
            ans = ans + 1

# Output
print(ans)


# Optimized solution
# 2020/07/26
# diverta 2019 Programming Contest - B

# Input
r, g, b, n = list(map(int,input().split()))

ans = 0

# Calc
for ir in range(n+1):
    vr = r * ir 
    if vr > n:
        break

    for ig in range(n+1):
        vg = g * ig 
        if vg + vr > n:
            break
        cb = n - vr - vg
        if cb % b == 0:
            ans = ans + 1

# Output
print(ans)
# Original solution
r, g, b, n = list(map(int, input().split()))
counter = 0
for s in range(n+1):
  for t in range(n-s+1):
    u = n - r*s - g*t
    if u >= 0 and u % b == 0:
      counter += 1
print(counter)

# Optimized solution
R, G, B, N = list(map(int, input().split()))
counter = 0
r = N // R + 1
for s in range(r):
  g = (N - s*R) // G + 1
  for t in range(g):
    u = N - R*s - G*t
    if u >= 0 and u % B == 0:
      counter += 1
print(counter)
# Original solution
r,g,b,n = list(map(int, input().split()))
cnt = 0
i=0
while r*i <= n:
  j=0
  while (r*i+g*j) <= n:
    if ( (n-(r*i+g*j)) % b ) == 0 :
      cnt += 1
    j += 1
  i += 1
print((str(cnt)))

# Optimized solution
r,g,b,n = list(map(int, input().split()))
cnt = 0
for i in range(0, n+1, r):
  if i == n:
    cnt += 1
    continue
  for j in range(0, n-i+1, g):
    if ( (n-(i+j)) % b ) == 0 :
      cnt += 1
print((str(cnt)))
# Original solution
from sys import stdin

def main():
    point = 0
    r,g,b,n = [int(x) for x in stdin.readline().rstrip().split()]
    for i in range(n//r+1):
        for j in range(n//g+1):
            if n-r*i-g*j >= 0:
                if (n-r*i-g*j)%b == 0:
                    point += 1
    print(point)

if __name__ == "__main__":
    main()

# Optimized solution
from sys import stdin

def main():
    point = 0
    r,g,b,n = [int(x) for x in stdin.readline().rstrip().split()]
    for i in range(n//r+1):
        for j in range((n-r*i)//g+1):
            if n-r*i-g*j >= 0:
                if (n-r*i-g*j)%b == 0:
                    point += 1
    print(point)

if __name__ == "__main__":
    main()
# Original solution
R, G, B, n = list(map(int, input().split()))
ans = 0
r = 0
while r*R <= n:
    g = 0
    while r*R + g*G <= n:
        b = (n - r*R - g*G) // B
        if (r*R + g*G + b*B == n) and (b >= 0):
            ans += 1
        g += 1
    r += 1
print(ans)


# Optimized solution
r, g, b, n = list(map(int, input().split()))
ans = 0
for i in range(0, n+1, r):
    for j in range(i, n+1, g):
        if (n-j) % b == 0:
            ans += 1
print(ans)
# Original solution
R, G, B, N = list(map(int, input().split()))
cnt = 0

for i in range(N//R+1):
    for j in range(N//G+1):
        b = N - R*i - G*j
        if(b >= 0 and b%B == 0):
            cnt += 1
print(cnt)

# Optimized solution
R, G, B, N = list(map(int, input().split()))
cnt = 0

for i in range(N//R+1):
    for j in range(N//G+1):
        b = N - R*i - G*j
        if(b < 0):
            break
        if(b%B == 0):
            cnt += 1
print(cnt)
# Original solution
MOD = 10 ** 9 + 7
fac = [1] * (10 ** 5 * 3)


def nCr(n, r):
    return fac[n] * pow(fac[n - r], MOD - 2, MOD) * pow(fac[r], MOD - 2, MOD) % MOD


for i in range(len(fac) - 1):
    fac[i + 1] = fac[i] * (i + 1) % MOD
b, w = list(map(int, input().split()))
n = b + w
p = [0] * n
q = [0] * n
for i in range(b, n):
    p[i] = (p[i - 1] + nCr(i - 1, b - 1) *
            pow(pow(2, i, MOD), MOD - 2, MOD)) % MOD
for i in range(w, n):
    q[i] = (q[i - 1] + nCr(i - 1, w - 1) *
            pow(pow(2, i, MOD), MOD - 2, MOD)) % MOD
for i in range(n):
    print(((q[i] + (1 - p[i] - q[i]) * pow(2, MOD - 2, MOD)) % MOD))


# Optimized solution
MOD = 10 ** 9 + 7
fac = [1] * (10 ** 5 * 3)


def nCr(n, r):
    return fac[n] * pow(fac[n - r], MOD - 2, MOD) * pow(fac[r], MOD - 2, MOD) % MOD


for i in range(len(fac) - 1):
    fac[i + 1] = fac[i] * (i + 1) % MOD
b, w = list(map(int, input().split()))
n = b + w
p = [0] * n
q = [0] * n
for i in range(b, n):
    p[i] = (p[i - 1] + nCr(i - 1, b - 1) *
            pow(pow(2, i, MOD), MOD - 2, MOD)) % MOD
for i in range(w, n):
    q[i] = (q[i - 1] + nCr(i - 1, w - 1) *
            pow(pow(2, i, MOD), MOD - 2, MOD)) % MOD
t = pow(2, MOD - 2, MOD)
for i in range(n):
    print(((q[i] + (1 - p[i] - q[i]) * t) % MOD))
# Original solution
B,W=list(map(int,input().split()))
mod=10**9+7
kaijo=[1]
Xdiv=[1]
two=pow(2,mod-2,mod)
for i in range(1,1+B+W):
    kaijo.append((kaijo[-1])*i%mod)
    Xdiv.append((Xdiv[-1]*two)%mod)
from collections import deque
gyaku=deque()
gyaku.append(pow(kaijo[B+W],mod-2,mod))
for i in range(B+W,0,-1):
    gyaku.appendleft((gyaku[0]*i)%mod)
def conb(a,b):
    return (kaijo[a]*gyaku[a-b]*gyaku[b])%mod
Blost,Wlost=0,0
if B==W:
    for k in range(1,B):
        print(two)
    for k in range(B,B+W):
        print((((1+Wlost-Blost)%mod*two)%mod))
        Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
        Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
    print((((1+Wlost-Blost)%mod*two)%mod))
elif B<W:
    for k in range(1,B):
        print(two)
    for k in range(B,W):
        print((((1+Wlost-Blost)%mod*two)%mod))
        Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
    for k in range(W,B+W):
        print((((1+Wlost-Blost)%mod*two)%mod))
        Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
        Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
    print((((1+Wlost-Blost)%mod*two)%mod))
elif B>W:
    for k in range(1,W):
        print(two)
    for k in range(W,B):
        print((((1+Wlost-Blost)%mod*two)%mod))
        Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
    for k in range(B,B+W):
        print((((1+Wlost-Blost)%mod*two)%mod))
        Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
        Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
    print((((1+Wlost-Blost)%mod*two)%mod))

# Optimized solution
B,W=list(map(int,input().split()))
mod=10**9+7
kaijo={0:1}
Xdiv={0:1}
two=pow(2,mod-2,mod)
for i in range(1,1+B+W):
    kaijo[i]=(kaijo[i-1]*i)%mod
    Xdiv[i]=(Xdiv[i-1]*two)%mod
gyaku={B+W:pow(kaijo[B+W],mod-2,mod)}
for i in range(B+W,0,-1):
    gyaku[i-1]=(gyaku[i]*i)%mod
def conb(a,b):
    if a<b:return 0
    return (kaijo[a]*gyaku[a-b]*gyaku[b])%mod
Blost,Wlost=0,0
for k in range(1,B+W):
    print((((1+Wlost-Blost)*two)%mod))
    Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
    Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
print((((1+Wlost-Blost)*two)%mod))
# Original solution
Q = 10**9+7
def getInv(N):#Qはmod
    inv = [0] * (N + 1)
    inv[0] = 1
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q%i]) % Q
    return inv

B, W = list(map( int, input().split()))
Z = getInv(B+W)
I = [1]*(B+W+1)
for i in range(1,B+W+1):
    I[i] = (I[i-1]*Z[i])%Q

F = [1]*(B+W+1)
for i in range(1,B+W+1):
    F[i] = F[i-1]*i%Q
w = 0
b = 0
for i in range(1,B+W+1):
    if i - 1 < B and i - 1 < W:
        print((I[2]))
    elif i - 1 == W and i - 1< B:
        w = pow(I[2],i-1,Q)
        print((((1 -  w)%Q*I[2]%Q + w)%Q))
    elif i - 1 >= W and i - 1< B: #i > B
        w += F[i-2]*I[i-1-W]%Q*I[W-1]%Q*pow(I[2],i-1,Q)%Q
        w %= Q
        print((((1 -  w)%Q*I[2]%Q + w)%Q))
    elif i - 1 == B and i - 1 < W:
        b = pow(I[2],i-1,Q)
        print(((1-b)%Q*I[2]%Q))
    elif i - 1 >= B and i - 1 < W: #i > W
        b += F[i-2]*I[i-1-B]%Q*I[B-1]%Q*pow(I[2],i-1,Q)%Q
        b %= Q
        print(((1-b)%Q*I[2]%Q))
    elif i - 1 == B and i - 1 == W:
        w = pow(I[2],i-1,Q)
        b = pow(I[2],i-1,Q)
        print((((1 -  w - b)%Q*I[2]%Q + w)%Q))
    else:
        w += F[i-2]*I[i-1-W]%Q*I[W-1]%Q*pow(I[2],i-1,Q)%Q
        w %= Q
        b += F[i-2]*I[i-1-B]%Q*I[B-1]%Q*pow(I[2],i-1,Q)%Q
        b %= Q
        print((((1 -  w - b)%Q*I[2]%Q + w)%Q))


# Optimized solution
Q = 10**9+7
def getInv(N):#Qはmod
    inv = [0] * (N + 1)
    inv[0] = 1
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q%i]) % Q
    return inv

B, W = list(map( int, input().split()))
Z = getInv(B+W)
I = [1]*(B+W+1)
for i in range(1,B+W+1):
    I[i] = (I[i-1]*Z[i])%Q

F = [1]*(B+W+1)
for i in range(1,B+W+1):
    F[i] = F[i-1]*i%Q
w = 0
b = 0
for i in range(1,B+W+1):
    if i - 1 < B and i - 1 < W:
        print((I[2]))
    # elif i - 1 == W and i - 1< B:
    #     w = pow(I[2],i-1,Q)
    #     print(((1 -  w)%Q*I[2]%Q + w)%Q)
    elif i - 1 >= W and i - 1< B: #i > B
        w += F[i-2]*I[i-1-W]%Q*I[W-1]%Q*pow(I[2],i-1,Q)%Q
        w %= Q
        print((((1 -  w)%Q*I[2]%Q + w)%Q))
    # elif i - 1 == B and i - 1 < W:
    #     b = pow(I[2],i-1,Q)
    #     print((1-b)%Q*I[2]%Q)
    elif i - 1 >= B and i - 1 < W: #i > W
        b += F[i-2]*I[i-1-B]%Q*I[B-1]%Q*pow(I[2],i-1,Q)%Q
        b %= Q
        print(((1-b)%Q*I[2]%Q))
    # elif i - 1 == B and i - 1 == W:
    #     w = pow(I[2],i-1,Q)
    #     b = pow(I[2],i-1,Q)
    #     print(((1 -  w - b)%Q*I[2]%Q + w)%Q)
    else:
        w += F[i-2]*I[i-1-W]%Q*I[W-1]%Q*pow(I[2],i-1,Q)%Q
        w %= Q
        b += F[i-2]*I[i-1-B]%Q*I[B-1]%Q*pow(I[2],i-1,Q)%Q
        b %= Q
        print((((1 -  w - b)%Q*I[2]%Q + w)%Q))
# Original solution
b, w = list(map(int, input().split()))
MOD = 10 ** 9 + 7
list_size = 200001

f_list = [1] * list_size
f_r_list = [1] * list_size

for i in range(list_size - 1):
	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, list_size + 1):
	f_r_list[-i] = int((f_r_list[-i + 1] * (list_size + 2 - i)) % MOD)

def comb(n, r):
	if n < r:
		return 0
	elif 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 

def calc(y, x):
	return (y * pow(x, MOD-2, MOD)) % MOD

ans = 500000004
print(ans)
for i in range(1, b+w):
	if i-1 >= b-1:
		ans -= calc(comb(i-1, b-1), pow(2, i+1))
	if i-w >= 0:
		ans += calc(comb(i-1, i-w), pow(2, i+1))
	ans %= MOD
	print(ans)


# Optimized solution
b, w = list(map(int, input().split()))
MOD = 10 ** 9 + 7
list_size = 200001

f_list = [1] * list_size
f_r_list = [1] * list_size

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

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

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

def comb(n, r):
	if n < r:
		return 0
	elif 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 

two_pow = [1]
for i in range(b+w+1):
	two_pow.append((two_pow[-1] * 500000004) % MOD)

ans = 500000004
print(ans)
for i in range(1, b+w):
	if i-1 >= b-1:
		ans -= comb(i-1, b-1) * two_pow[i+1]
	if i-w >= 0:
		ans += comb(i-1, i-w) * two_pow[i+1]
	ans %= MOD
	print(ans)
# Original solution
import sys

B, W = list(map(int, sys.stdin.readline().split()))
MOD = 10**9 + 7

L = B+W
fact = [1]*(L+1)
rfact = [1]*(L+1)
for i in range(L):
    fact[i+1] = r = fact[i] * (i+1) % MOD
    rfact[i+1] = pow(r, MOD-2, MOD)

rev2 = pow(2, MOD-2, MOD)

p = q = 0
base = 1
ans = ["%d\n" % rev2]
for i in range(1, B+W):
    base = rev2 * base % MOD
    if i-B >= 0:
        p = (p + ((fact[i-1]*rfact[B-1] % MOD)*rfact[i-B] % MOD)*base % MOD) % MOD
    if i-W >= 0:
        q = (q + ((fact[i-1]*rfact[W-1] % MOD)*rfact[i-W] % MOD)*base % MOD) % MOD
    ans.append("%d\n" % ((1-p+q)*rev2 % MOD))
sys.stdout.writelines(ans)

# Optimized solution
import sys

B, W = list(map(int, sys.stdin.readline().split()))
MOD = 10**9 + 7

L = B+W
fact = [1]*(L+1)
rfact = [1]*(L+1)
for i in range(L):
    fact[i+1] = r = fact[i] * (i+1) % MOD
    rfact[i+1] = pow(r, MOD-2, MOD)

rev2 = pow(2, MOD-2, MOD)

p = q = 0
base = 1
ans = ["%d\n" % rev2]
for i in range(1, B+W):
    base = rev2 * base % MOD
    if i-B >= 0:
        p = (p + (fact[i-1]*rfact[B-1]*rfact[i-B] % MOD)*base % MOD) % MOD
    if i-W >= 0:
        q = (q + (fact[i-1]*rfact[W-1]*rfact[i-W] % MOD)*base % MOD) % MOD
    ans.append("%d\n" % ((1-p+q)*rev2 % MOD))
sys.stdout.writelines(ans)
# Original solution
import sys

B, W = list(map(int, sys.stdin.readline().split()))
MOD = 10**9 + 7

L = B+W
fact = [1]*(L+1)
rfact = [1]*(L+1)
for i in range(L):
    fact[i+1] = r = fact[i] * (i+1) % MOD
    rfact[i+1] = pow(r, MOD-2, MOD)

rev2 = pow(2, MOD-2, MOD)

p = q = 0

L = min(B, W)
r2 = "%d\n" % rev2
for i in range(L):
    sys.stdout.write(r2)
base = pow(rev2, L-1, MOD)

rB = rfact[B-1]; rW = rfact[W-1]
for i in range(L, B+W):
    base = rev2 * base % MOD
    if i >= B:
        p = (p + (fact[i-1]*rfact[i-B] % MOD) * (rB * base % MOD) % MOD) % MOD
    if i >= W:
        q = (q + (fact[i-1]*rfact[i-W] % MOD) * (rW * base % MOD) % MOD) % MOD
    sys.stdout.write("%d\n" % ((1-p+q)*rev2 % MOD))

# Optimized solution
import sys
write = sys.stdout.write

B, W = list(map(int, sys.stdin.readline().split()))
MOD = 10**9 + 7

L = B+W
fact = [1]*(L+1)
rfact = [1]*(L+1)
for i in range(L):
    fact[i+1] = r = fact[i] * (i+1) % MOD
rfact[L] = pow(fact[L], MOD-2, MOD)
for i in range(L, 0, -1):
    rfact[i-1] = rfact[i] * i % MOD

rev2 = pow(2, MOD-2, MOD)

p = q = 0

L = min(B, W)
r2 = "%d\n" % rev2
for i in range(L):
    write(r2)
base = pow(rev2, L-1, MOD)

rB = rfact[B-1]; rW = rfact[W-1]
for i in range(L, B+W):
    base = rev2 * base % MOD
    if i >= B:
        p = (p + (fact[i-1]*rfact[i-B] % MOD) * (rB * base % MOD) % MOD) % MOD
    if i >= W:
        q = (q + (fact[i-1]*rfact[i-W] % MOD) * (rW * base % MOD) % MOD) % MOD
    write("%d\n" % ((1-p+q)*rev2 % MOD))
# Original solution
mod=10**9+7
inv2=5*10**8+4
B,W=list(map(int,input().split()))
 
Factorial=[1]*(B+W+1)
for i in range(1,B+W+1):
  Factorial[i]=Factorial[i-1]*(i)%mod
def power(x,y):
  if y==0:
    return 1
  elif y==1:
    return x%mod
  elif y%2==0:
    return power(x,y//2)**2%mod
  else:
    return (power(x,y//2)**2)*x%mod
 
inverseFactorial=[1]*(B+W+1)
inverseFactorial[B+W]=power(Factorial[B+W],mod-2)
for i in range(0,B+W)[::-1]:
  inverseFactorial[i]=(inverseFactorial[i+1]*(i+1))%mod
  
def comb(x,y):
  if x<y or y<0:
    return 0
  else:
    return (Factorial[x]*inverseFactorial[y]*inverseFactorial[x-y])%mod
w,b=[0]*(B+W+1),[0]*(B+W+1)
for i in range(1,B+W+1):
  w[i]=(w[i-1]+comb(i-1,W-1)*power(2,B+W-i))%mod
  b[i]=(b[i-1]+comb(i-1,B-1)*power(2,B+W-i))%mod
ans=[0]*(B+W+1)
#print(w)
#print(b)
for i in range(1,B+W+1):
  ans[i]=(power(2,B+W)+w[i-1]-b[i-1])*power(inv2,B+W+1)
  print((ans[i]%mod))

# Optimized solution
mod=10**9+7
inv2=5*(10**8)+4
B,W=list(map(int,input().split()))
 
Factorial=[1]*(B+W+1)
for i in range(1,B+W+1):
  Factorial[i]=Factorial[i-1]*(i)%mod
def power(x,y):
  if y==0:
    return 1
  elif y==1:
    return x%mod
  elif y%2==0:
    return power(x,y//2)**2%mod
  else:
    return (power(x,y//2)**2)*x%mod
 
inverseFactorial=[1]*(B+W+1)
inverseFactorial[B+W]=power(Factorial[B+W],mod-2)
for i in range(0,B+W)[::-1]:
  inverseFactorial[i]=(inverseFactorial[i+1]*(i+1))%mod
  
def comb(x,y):
  if x<y or y<0:
    return 0
  else:
    return (Factorial[x]*inverseFactorial[y]*inverseFactorial[x-y])%mod
w,b=[0]*(B+W+1),[0]*(B+W+1)
p2=[1]*(B+W+1)
for i in range(1,B+W+1):
  p2[i]=(p2[i-1]*2)%mod
bunbo=power(inv2,B+W+1)  

for i in range(1,B+W+1):
  w[i]=(w[i-1]+comb(i-1,W-1)*p2[B+W-i])%mod
  b[i]=(b[i-1]+comb(i-1,B-1)*p2[B+W-i])%mod
ans=[0]*(B+W+1)
#print(w)
#print(b)
for i in range(1,B+W+1):
  ans[i]=(p2[B+W]+w[i-1]-b[i-1])*bunbo
  print((ans[i]%mod))
# Original solution
B, W = list(map(int, input().split()))

mod = 1000000007

def mul(a, b):
  return ((a % mod) * (b % mod)) % mod

def power(x, y):
  #print(x,y)
  if   y == 0     : return 1
  elif y == 1     : return x % mod
  elif y % 2 == 0 : return power(x, y/2)**2 % mod
  else            : return power(x, y//2)**2 * x % mod
  
memo={0:1,1:2}
def power2(y):
  if y in memo:
    pass
  elif y % 2 == 0 :
    memo[y] = power2(y/2)**2 % mod
  else            : 
    memo[y] = power2(y//2)**2 * 2 % mod
  return memo[y]

def div(a, b):
  return mul(a, power(b, mod-2))


#B-1列目
B_1 = [0]*(B) + [1]*(W)
for i in range(B, W+B-1):
  #print(i)
  B_1[i+1]=(B_1[i]*(i))//(i-B+1)
  #print(B_1)
  
#print(B_1)
  
#B列目
B_0 = [0]*(B) + [1]*(W)
for i in range(B, W+B-1):
  B_0[i+1]=B_0[i]*2 + B_1[i+1]
#print(B_0)

#W-1列目
W_1 = [0]*(W) + [1]*(B)
for i in range(W, W+B-1):
  W_1[i+1]=W_1[i]*(i)//(i-W+1)
#print(W_1)
  
#W列目
W_0 = [0]*(W) + [1]*(B)
for i in range(W, W+B-1):
  W_0[i+1]=W_0[i]*2 + W_1[i+1]
#print(W_0)

#分母

for i in range(B+W):
  b = B_0[i]
  w = W_0[i]
  log2m = i
  #print(b,w,log2m)
  
  while not b%2 and not w%2 and log2m:
    b=b//2
    w=w//2
    log2m-=1
  
  p = power2((mod-2)*(log2m+1))
  a = (mul(power2(log2m)-b + w,p))%mod
  print(a)
  


# Optimized solution
B, W = list(map(int, input().split()))

mod = 1000000007

def mul(a, b):
  return ((a % mod) * (b % mod)) % mod
  
memo={0:1,1:2}
def power2(y):
  if y in memo:
    pass
  elif y % 2 == 0 :
    memo[y] = power2(y/2)**2 % mod
  else            : 
    memo[y] = power2(y//2)**2 * 2 % mod
  return memo[y]
  
#B列目
B_0 = [0 for _ in range(B)] + [1 for _ in range(W)]
B_1 = 1
for i in range(B, W+B-1):
  B_1 = (B_1*i//(i-B+1))%mod
  B_0[i+1]=(B_0[i]*2 + B_1)%mod

#W列目
W_0 = [0 for _ in range(W)] + [1 for _ in range(B)]
W_1 = 1
for i in range(W, W+B-1):
  W_1 = W_1 * i//(i-W+1) %mod
  W_0[i+1]=(W_0[i]*2 + W_1) %mod
#print(W_0)

#分母


for i in range(B+W):
  b = B_0[i]
  w = W_0[i]
  log2m = i
  #print(b,w,log2m)
  
  while not b%2 and not w%2 and log2m:
    b=b//2
    w=w//2
    log2m-=1
  
  p = power2((mod-2)*(log2m+1))
  a = (mul(power2(log2m)-b + w,p))%mod
  print(a)
# Original solution
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def POW(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x
    elif y % 2 == 0:
        return POW(x, y // 2) ** 2 % MOD
    else:
        return POW(x, y // 2) ** 2 * x % MOD
def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return eval(input())
from fractions import Fraction

def binomials(n, k):
    ret = [0] * (n + 1)
    ret[k] = 1
    for i in range(k, n):
        ret[i + 1] = ret[i] * i // (i - k + 1)
    return ret

def main():
    B, W = LI()
    N = B + W
    p, q = 0, 0
    biB = binomials(N, B)
    biW = binomials(N, W)
    cnt = 1
    inv2 = mod_factorial(1, 2)
    denomi = inv2
    for i in range(N):
        p = p * 2 + biB[i]
        q = q * 2 + biW[i]
        ans = (cnt - p + q) * denomi % MOD
        print(ans)
        cnt = (cnt * 2) % MOD
        denomi = (denomi * inv2) % MOD

    return 0

main()

# Optimized solution
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def POW(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x
    elif y % 2 == 0:
        return POW(x, y // 2) ** 2 % MOD
    else:
        return POW(x, y // 2) ** 2 * x % MOD
def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return eval(input())
from fractions import Fraction

def binomials(n, k):
    ret = [0] * (n + 1)
    ret[k] = 1
    for i in range(k, n):
        ret[i + 1] = mod_factorial(ret[i] * i % MOD, i - k + 1)
    return ret

def main():
    B, W = LI()
    N = B + W
    p, q = 0, 0
    biB = binomials(N, B)
    biW = binomials(N, W)
    cnt = 1
    inv2 = mod_factorial(1, 2)
    denomi = inv2
    for i in range(N):
        p = p * 2 + biB[i]
        q = q * 2 + biW[i]
        ans = (cnt - p + q) * denomi % MOD
        print(ans)
        cnt = (cnt * 2) % MOD
        denomi = (denomi * inv2) % MOD

    return 0

main()
# Original solution
MOD = 10**9+7
fact = [1]
invfact = [1]
for i in range(1,2*10**5 + 100):
    fact.append((fact[i-1] * i) % MOD)
    invI = pow(i,MOD-2,MOD)
    invfact.append((invfact[i-1] * invI) % MOD)

B,W = list(map(int,input().split()))
N = B+W

pcSum = [1 for _ in range(B+W+1)]
qcSum = [1 for _ in range(B+W+1)]
def modComb(n,m):
    if m < 0 or m > n: return(0)
    ans = fact[n] * invfact[m] 
    ans %= MOD
    ans *= invfact[n-m]
    ans %= MOD
    return(ans)

for i in range(B+W-1):
    pcSum[i+1] = 2*pcSum[i] - modComb(i,B-1)
    pcSum[i+1] %= MOD
    if (i+1-W) <= B-1:
        qcSum[i+1] = 2*qcSum[i] - modComb(i,B-1) - modComb(i,i+1-W)
        qcSum[i+1] %= MOD
    else:
        qcSum[i+1] = 0

p = []
q = []
for i in range(B+W):
    coefficient = pow(2,i*(MOD-2),MOD)
    pvalue = pcSum[i] * coefficient
    pvalue %= MOD
    p.append(pvalue)
    qvalue = qcSum[i] * coefficient
    qvalue %= MOD
    q.append(qvalue)
invTwo = pow(2,MOD-2,MOD)
for i in range(N):
    answer = p[i] - invTwo * q[i]
    answer %= MOD
    print(answer)


# Optimized solution
MOD = 10**9+7
fact = [1]
invfact = [1]
for i in range(1,2*10**5 + 100):
    fact.append((fact[i-1] * i) % MOD)
    invI = pow(i,MOD-2,MOD)
    invfact.append((invfact[i-1] * invI) % MOD)

B,W = list(map(int,input().split()))
N = B+W

pcSum = [1 for _ in range(B+W+1)]
qcSum = [1 for _ in range(B+W+1)]
def modComb(n,m):
    if m < 0 or m > n: return(0)
    ans = fact[n] * invfact[m] 
    ans %= MOD
    ans *= invfact[n-m]
    ans %= MOD
    return(ans)

for i in range(B+W-1):
    pcSum[i+1] = 2*pcSum[i] - modComb(i,B-1)
    pcSum[i+1] %= MOD
    if (i+1-W) <= B-1:
        qcSum[i+1] = 2*qcSum[i] - modComb(i,B-1) - modComb(i,i+1-W)
        qcSum[i+1] %= MOD
    else:
        qcSum[i+1] = 0

p = []
q = []
powOfTwo = []
value = 1
invTwo = pow(2,MOD-2,MOD)
for _ in range(N):
    powOfTwo.append(value)
    value *= invTwo
    value %= MOD
for i in range(B+W):
    # coefficient = pow(2,i*(MOD-2),MOD)
    coefficient = powOfTwo[i]
    pvalue = pcSum[i] * coefficient
    pvalue %= MOD
    p.append(pvalue)
    qvalue = qcSum[i] * coefficient
    qvalue %= MOD
    q.append(qvalue)
for i in range(N):
    answer = p[i] - invTwo * q[i]
    answer %= MOD
    print(answer)