Buggy python submission (verdict: Time Limit Exceeded):
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
for i in range(2,B+W+1):
   inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick%Mod
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
for i in range(2,B+W+1):
   inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
for i in range(2,B+W+1):
   inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*power_func(i-B+1, Mod-2,Mod)%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*power_func(i-W+1, Mod-2,Mod)%Mod]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*power_func(i-B+1, Mod-2,Mod)%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*power_func(i-W+1, Mod-2,Mod)%Mod]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
 
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

consts_B, consts_W = [], []
for i in range(B+W):
  consts_B += [comb(i,B-1,Mod)]
  consts_W += [comb(i,W-1,Mod)]

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += consts_B[i]*inv
  q += consts_W[i]*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
 
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
  
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

p, q = 0, 0
inv = 1
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  inv *= magick
  p += comb(i,B-1,Mod)*inv
  q += comb(i,W-1,Mod)*inv

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

DP_1 = [[0 for j in range(B+1)] for i in range(B+W+1)]
DP_1[0][B] = 1
for i in range(B+W):
  for j in range(B+1):
    if j == 0:
      DP_1[i+1][j] = 2*DP_1[i][j]+DP_1[i][j+1]
    elif j == B:
      DP_1[i+1][j] = DP_1[i][j]
    else:
      DP_1[i+1][j] = DP_1[i][j] +DP_1[i][j+1]
      
DP_2 = [[0 for j in range(W+1)] for i in range(B+W+1)]
DP_2[0][W] = 1
for i in range(B+W):
  for j in range(W+1):
    if j == 0:
      DP_2[i+1][j] = 2*DP_2[i][j]+DP_2[i][j+1]
    elif j == W:
      DP_2[i+1][j] = DP_2[i][j]
    else:
      DP_2[i+1][j] = DP_2[i][j] +DP_2[i][j+1]
      
inv = 1
for i in range(B+W):
  print(((-DP_1[i][0]+DP_2[i][0])*inv*magick+ magick)%Mod)
  inv = inv * magick%Mod

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]

Buggy python submission (verdict: Time Limit Exceeded):
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

DP_1 = [[0 for j in range(B+1)] for i in range(B+W+1)]
DP_1[0][B] = 1
for i in range(B+W):
  for j in range(B+1):
    if j == 0:
      DP_1[i+1][j] = 2*DP_1[i][j]+DP_1[i][j+1]
    elif j == B:
      DP_1[i+1][j] = DP_1[i][j]
    else:
      DP_1[i+1][j] = DP_1[i][j] +DP_1[i][j+1]
      
DP_2 = [[0 for j in range(W+1)] for i in range(B+W+1)]
DP_2[0][W] = 1
for i in range(B+W):
  for j in range(W+1):
    if j == 0:
      DP_2[i+1][j] = 2*DP_2[i][j]+DP_2[i][j+1]
    elif j == W:
      DP_2[i+1][j] = DP_2[i][j]
    else:
      DP_2[i+1][j] = DP_2[i][j] +DP_2[i][j+1]
      
inv = 1
for i in range(B+W):
  print(((-DP_1[i][0]+DP_2[i][0])*inv*magick+ magick)%Mod)
  inv = inv * magick%Mod

Fixed submission:
B, W = map(int,input().split())
Mod = 10**9+7
magick = 500000004

inv_t = [0]+[1]
inv_2 = [0]+[magick]
for i in range(2,B+W+1):
  inv_t += [inv_t[Mod % i] * (Mod - int(Mod / i)) % Mod]
  inv_2 += [inv_2[-1]*magick % Mod]

consts_B, consts_W = [0]*(B-1)+ [1], [0]*(W-1)+[1]
for i in range(B+W):
  if i >= B: consts_B += [consts_B[-1]*(i)*inv_t[i-B+1]%Mod]
  if i >= W: consts_W += [consts_W[-1]*(i)*inv_t[i-W+1]%Mod]

p, q = 0, 0
for i in range(B+W):
  print((1-p+q)*magick%Mod)
  p += consts_B[i]*inv_2[i+1]
  q += consts_W[i]*inv_2[i+1]