import sys,fractions

a = eval(input())

n = len(a)

t = []

ans = [0] * n

cnt = 0

tmp = a[0]

for i in range(n):

    if a[i] == tmp:

       cnt += 1 

    else:

        t.append(cnt)

        tmp = a[i]

        cnt = 1

t.append(cnt)

N = len(t)

len = 0

for i in range(N)[::2]:

    tmp_len = t[i] + t[i+1]

    #R

    ans[len + t[i] - 1] += int((t[i]+1)/2)

    ans[len + t[i]] += int(t[i]/2)

    #L

    ans[len + t[i] - 1] += int(t[i+1]/2)

    ans[len + t[i]] += int((t[i+1]+1)/2)

    len += tmp_len

L = [str(i) for i in ans]

print((" ".join(L)))
from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

import sys,bisect,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

mod2 = 998244353

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))



s = eval(input())

n = len(s)

aa = []

for i,t in enumerate(s):

    if i == 0:

        tmp = t

        cnt = 1

        continue

    if tmp != t:

        aa.append(cnt)

        cnt = 1

        tmp = t

    else:

        cnt += 1

aa.append(cnt)

# print(aa)

res = [0] * n

cnt = 0

for i in range(len(aa))[::2]:

    l = aa[i]; r = aa[i+1]

    av = (l+r)//2

    if (l%2 and r%2) or (l%2==0 and r%2==0):

        res[cnt+l-1] = av

        res[cnt+l] = av

    else:

        if l%2:

            res[cnt+l-1] = av+1

            res[cnt+l] = av

        else:

            res[cnt+l-1] = av

            res[cnt+l] = av+1

    cnt += l+r

print((*res))
import sys, fractions

a = eval(input())
n = len(a)
t = []
ans = [0] * n
cnt = 0
tmp = a[0]
for i in range(n):
    if a[i] == tmp:
        cnt += 1
    else:
        t.append(cnt)
        tmp = a[i]
        cnt = 1
t.append(cnt)
N = len(t)
len = 0
for i in range(N)[::2]:
    tmp_len = t[i] + t[i + 1]
    # R
    ans[len + t[i] - 1] += int((t[i] + 1) / 2)
    ans[len + t[i]] += int(t[i] / 2)
    # L
    ans[len + t[i] - 1] += int(t[i + 1] / 2)
    ans[len + t[i]] += int((t[i + 1] + 1) / 2)
    len += tmp_len
L = [str(i) for i in ans]
print((" ".join(L)))

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
mod2 = 998244353
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpln(n):
    return list(int(sys.stdin.readline()) for i in range(n))


s = eval(input())
n = len(s)
aa = []
for i, t in enumerate(s):
    if i == 0:
        tmp = t
        cnt = 1
        continue
    if tmp != t:
        aa.append(cnt)
        cnt = 1
        tmp = t
    else:
        cnt += 1
aa.append(cnt)
# print(aa)
res = [0] * n
cnt = 0
for i in range(len(aa))[::2]:
    l = aa[i]
    r = aa[i + 1]
    av = (l + r) // 2
    if (l % 2 and r % 2) or (l % 2 == 0 and r % 2 == 0):
        res[cnt + l - 1] = av
        res[cnt + l] = av
    else:
        if l % 2:
            res[cnt + l - 1] = av + 1
            res[cnt + l] = av
        else:
            res[cnt + l - 1] = av
            res[cnt + l] = av + 1
    cnt += l + r
print((*res))

-import sys, fractions +from collections import Counter, defaultdict, deque +from heapq import heappop, heappush, heapify +import sys, bisect, math, itertools, fractions, pprint -a = eval(input()) -n = len(a) -t = [] -ans = [0] * n +sys.setrecursionlimit(10**8) +mod = 10**9 + 7 +mod2 = 998244353 +INF = float("inf") + + +def inp(): +    return int(sys.stdin.readline()) + + +def inpl(): +    return list(map(int, sys.stdin.readline().split())) + + +def inpln(n): +    return list(int(sys.stdin.readline()) for i in range(n)) + + +s = eval(input()) +n = len(s) +aa = [] +for i, t in enumerate(s): +    if i == 0: +        tmp = t +        cnt = 1 +        continue +    if tmp != t: +        aa.append(cnt) +        cnt = 1 +        tmp = t +    else: +        cnt += 1 +aa.append(cnt) +# print(aa) +res = [0] * n -tmp = a[0] -for i in range(n): -    if a[i] == tmp: -        cnt += 1 +for i in range(len(aa))[::2]: +    l = aa[i] +    r = aa[i + 1] +    av = (l + r) // 2 +    if (l % 2 and r % 2) or (l % 2 == 0 and r % 2 == 0): +        res[cnt + l - 1] = av +        res[cnt + l] = av -        t.append(cnt) -        tmp = a[i] -        cnt = 1 -t.append(cnt) -N = len(t) -len = 0 -for i in range(N)[::2]: -    tmp_len = t[i] + t[i + 1] -    # R -    ans[len + t[i] - 1] += int((t[i] + 1) / 2) -    ans[len + t[i]] += int(t[i] / 2) -    # L -    ans[len + t[i] - 1] += int(t[i + 1] / 2) -    ans[len + t[i]] += int((t[i + 1] + 1) / 2) -    len += tmp_len -L = [str(i) for i in ans] -print((" ".join(L))) +        if l % 2: +            res[cnt + l - 1] = av + 1 +            res[cnt + l] = av +        else: +            res[cnt + l - 1] = av +            res[cnt + l] = av + 1 +    cnt += l + r +print((*res))