a = 0
pvk = 50
pvr = 50
somak = 0
somar = 0
ataque = 0
pvk_ = 1
pvr_ = 1
while(pvk > 0 and pvr > 0):
ataque = int(input())
if(ataque > 0):
while(ataque > 0 and pvk_ > 0):
somak = somak+ataque
pvk_ = pvk-somak
ataque = int(input())
print("Ken: {} - {} = {}" .format(pvk, somak, pvk_))
pvk = pvk_
somak = 0
elif(ataque < 0):
while(ataque < 0 and pvr_ > 0):
somar = somar-ataque
pvr_ = pvr-somar
ataque = int(input())
print("Ryu: {} - {} = {}" .format(pvr, somar, pvr_))
pvr = pvr_
somar = 0
if (ataque > 0):
while (ataque > 0 and pvk_ > 0):
somak = somak + ataque
pvk_ = pvk - somak
ataque = int(input())
print("Ken: {} - {} = {}".format(pvk, somak, pvk_))
pvk = pvk_
somak = 0
if(ataque < 0):
somar =ataque*(-1)
elif (ataque < 0):
while (ataque < 0 and pvr_ > 0):
somar = somar - ataque
pvr_ = pvr - somar
ataque = int(input())
print("Ryu: {} - {} = {}".format(pvr, somar, pvr_))
pvr = pvr_
somar = 0
if (ataque > 0):
somak = ataque
if(pvr > pvk):
a = a+1
elif(pvk > pvr):
a = a-1
pvk = 50
pvr = 50
pvk_ = 1
pvr_ = 1
ataque_ = ataque
if(ataque_ > 0):
somak = ataque_
pvk_ = pvk-ataque
print("Ken: {} - {} = {}".format(pvk, somak, pvk_))
somak = 0
pvk = pvk_
elif(ataque_ < 0):
somar = -ataque_
pvr = pvr+ataque_
print("Ryu: {} - {} = {}".format(pvr, somar, pvr_))
pvr = pvr_
somar = 0
while(pvk > 0 and pvr > 0):
ataque = int(input())
if(ataque > 0):
while(ataque > 0 and pvk_ > 0):
somak = somak+ataque
pvk_ = pvk-somak
ataque = int(input())
print("Ken: {} - {} = {}" .format(pvk, somak, pvk_))
pvk = pvk_
somak=0
elif(ataque < 0):
while(ataque < 0 and pvr_ > 0):
somar = somar-ataque
pvr_ = pvr-somar
ataque = int(input())
print("Ryu: {} - {} = {}" .format(pvr, somar, pvr_))
pvr = pvr_
if (pvk <= 0 or pvr <= 0):
break
somar = 0
if (ataque > 0):
while (ataque > 0 and pvk_ > 0):
somak = somak + ataque
pvk_ = pvk - somak
ataque = int(input())
print("Ken: {} - {} = {}".format(pvk, somak, pvk_))
pvk = pvk_
if (pvk <= 0 or pvr <= 0):
break
somak = 0
if(ataque < 0):
somar =ataque*-1
elif(ataque < 0):
while(ataque < 0 and pvr_ > 0):
somar = somar-ataque
pvr_ = pvr-somar
ataque = int(input())
print("Ryu: {} - {} = {}" .format(pvr, somar, pvr_))
pvr = pvr_
if(pvk <= 0 or pvr <= 0):
break
somar = 0
if(ataque > 0):
somar = ataque
elif (ataque < 0):
while (ataque < 0 and pvr_ > 0):
somar = somar - ataque
pvr_ = pvr - somar
ataque = int(input())
print("Ryu: {} - {} = {}".format(pvr, somar, pvr_))
pvr = pvr_
if (pvk <= 0 or pvr <= 0):
break
somar = 0
if(pvk > pvr):
a = a-1
if(pvr > pvk):
a = a+1
if(a > 0):
print("Ryu venceu")
if(a == 0):
print("empatou")
if(a < 0):