n = int(input()) l=[] for x in range(n): y= input() if ((y[0]=="T") and (len(l)<20)): if len(l)<10: l.append(str(x+1)) else: z,y= y.split(" ") if int(y)<2: l.append(str(x+1)) print(" ".join(l))
1 2 3 4 5 6 7 8 9 10 11 12 13 | n = int(input()) l=[] for x in range(n): y= input() if ((y[0]=="T") and (len(l)<20)): if len(l)<10: l.append(str(x+1)) else: z,y= y.split(" ") if int(y)<2: l.append(str(x+1)) print(" ".join(l)) |