n = int(input())
ans = ""
counter = 20
indeks = 0
for i in range(n):
if counter == 0:
break
choice, number = input().split(" ")
indeks += 1
if choice == "TAK":
if counter > 10:
ans += f" {indeks}"
counter -= 1
elif counter > 0 and int(number) < 2:
ans += f" {indeks}"
counter -= 1
print(ans[1:])
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | n = int(input()) ans = "" counter = 20 indeks = 0 for i in range(n): if counter == 0: break choice, number = input().split(" ") indeks += 1 if choice == "TAK": if counter > 10: ans += f" {indeks}" counter -= 1 elif counter > 0 and int(number) < 2: ans += f" {indeks}" counter -= 1 print(ans[1:]) |
English