a, opt = [0], [0]
data = input()
tmp = 0b0

for i,item in enumerate(data):
    tmp = tmp ^ 2**(ord(item) - 96)
    a.append(tmp)
    min_num = ""
    for j in range(i+1):
        hoge = a[i+1] ^ a[j]
        if (hoge == 0 or hoge & (hoge-1) == 0):
            if min_num == "":
                min_num = opt[j]
            elif opt[j] < min_num:
                min_num = opt[j]
    opt.append(min_num + 1)
print(opt)