Buggy python submission (verdict: Time Limit Exceeded):
B,W=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)

Fixed submission:
B,W=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)

Buggy python submission (verdict: Time Limit Exceeded):
B,W=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)*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)
elif B<W:
    for k in range(1,B):
        print(two)
    for k in range(B,W):
        print(((1+Wlost-Blost)*two)%mod)
        Blost=(Blost+conb(k-1,B-1)*Xdiv[k])%mod
    for k in range(W,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)
elif B>W:
    for k in range(1,W):
        print(two)
    for k in range(W,B):
        print(((1+Wlost-Blost)*two)%mod)
        Wlost=(Wlost+conb(k-1,W-1)*Xdiv[k])%mod
    for k in range(B,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)

Fixed submission:
B,W=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)

Buggy python submission (verdict: Time Limit Exceeded):
B,W=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):
    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)

Fixed submission:
B,W=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)

Buggy python submission (verdict: Time Limit Exceeded):
B,W=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):
    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):
    Blost.append((Blost[-1]+conb(k-1,B-1)*Xdiv[k])%mod)
    Wlost.append((Wlost[-1]+conb(k-1,W-1)*Xdiv[k])%mod)
    print(((1+Wlost[k-1]-Blost[k-1])*two)%mod)
print(((1+Wlost[B+W-1]-Blost[B+W-1])*two)%mod)

Fixed submission:
B,W=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)

Buggy python submission (verdict: Runtime Error):
B,W=map(int,input().split())
mod=10**9+7
kaijo=[1]
for i in range(1,1+B+W):
    kaijo.append((kaijo[-1])*i%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]
Xdiv=[pow(pow(2,i,mod),mod-2,mod) for i in range(1+B+W)]
for k in range(1,B+W):
    if k<B:
        Blost.append(0)
    elif k>=B:
        Blost.append((Blost[-1]++conb(k-1,B-1)*Xdiv[k])%mod)
    if k<W:
        Wlost.append(0)
    elif k>=W:
        Wlost.append((Wlost[-1]+conb(k-1,W-1)*Xdiv[k])%mod)
Blost.append(1)
Wlost.append(1)
for k in range(1,B+W+1):
    print(((1+Wlost[k-1]-Blost[k-1])*two)%mod)

Fixed submission:
B,W=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)