import sys
s=input() #배열을 다 -1로 초기화 res=[-1]*26
for i in range(len(s)): pos=ord(s[i])-97 if res[pos]<0: res[pos]=i #0보다 작을때 변경을 해야 나중에 같은 #알파벳이 나와도 변경이 안됨
for i in res: print(i,end=' ')