a=int(input())
x=[]
y=0
z=0
for i in range(a):
dane = input().split()
b = dane[0]
c=int(dane[1])
z=z+1
if y==20:
break
if (b=="TAK"):
if (y>10):
if(c!=2):
x.append(i+1)
y=y+1
else:
x.append(i+1)
y=y+1
print(*x, sep=" ")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | a=int(input()) x=[] y=0 z=0 for i in range(a): dane = input().split() b = dane[0] c=int(dane[1]) z=z+1 if y==20: break if (b=="TAK"): if (y>10): if(c!=2): x.append(i+1) y=y+1 else: x.append(i+1) y=y+1 print(*x, sep=" ") |
English