e=0
for j,k in enumerate(input()):
 if"q">k:e+=1
 elif e%2:print j