ka = []
a = 0
while a == 0:
try:
ka.append(input())
except:
a=1
else:
ka.append(input())
b = 0
c = 0
for a in range(len(ka)):
if ka[a][0] == "レ":
c = 1
continue
elif ka[a][0] == "二":
b = a
c = 2
continue
print(ka[a][1:])
if c == 1:
print(ka[a-1][1:])
c = 0
elif c == 2 and ka[a][0] == "一":
print(ka[b][1:])
To embed this project on your website, copy the following code and paste it into your website's HTML: