def main():

    S = eval(input())

    n = len(S)

    i = 0

    res = []

    while i < len(S):

        countL, countR = 0, 0

        while i < n and S[i] == "R":

            countR += 1

            i += 1

        while i < n and S[i] == "L":

            countL += 1

            i += 1

        if (countL+countR) % 2 == 0:

            half = (countL+countR) // 2

            res += [0]*(countR-1) + [half]*2 + [0]*(countL-1)

        else:

            half1 = (countR+countL+1)//2

            half2 = (countR+countL) - half1

            if countR > countL:

                if (countR-1) % 2 == 0:

                    res += [0]*(countR-1) + [half1, half2] + [0]*(countL-1)

                else:

                    res += [0]*(countR-1) + [half2, half1] + [0]*(countL-1)

            else:

                if (countL-1) % 2 == 0:

                    res += [0]*(countR-1) + [half2, half1] + [0]*(countL-1)

                else:

                    res += [0]*(countR-1) + [half1, half2] + [0]*(countL-1)

    return res



if __name__ == '__main__':

    output = main()

    print((" ".join(map(str, output))))
def main():



    S = eval(input())

    n = len(S)

    i = 0

    ans = [0 for _ in range(n)]

    while i < n:

        countL, countR = 0, 0

        while i < n and S[i] == 'R':

            countR += 1

            i += 1

        while i < n and S[i] == 'L':

            countL += 1

            i += 1

        if(abs(countL-countR) % 2 == 0):

            cL, cR = (countL + countR) // 2, (countL + countR) // 2

        else:

            c = (countL + countR + 1) // 2

            if(countR > countL):

                if(countR % 2 == 1): cR, cL = c, c-1

                else: cR, cL = c-1, c

            else:

                if(countL % 2 == 1) : cR, cL = c-1, c

                else: cR, cL = c, c-1

        ans[i-countL] = cL

        ans[i-countL-1] = cR



    return " ".join(map(str, ans))



if __name__ == '__main__':

    print((main()))
def main():
    S = eval(input())
    n = len(S)
    i = 0
    res = []
    while i < len(S):
        countL, countR = 0, 0
        while i < n and S[i] == "R":
            countR += 1
            i += 1
        while i < n and S[i] == "L":
            countL += 1
            i += 1
        if (countL + countR) % 2 == 0:
            half = (countL + countR) // 2
            res += [0] * (countR - 1) + [half] * 2 + [0] * (countL - 1)
        else:
            half1 = (countR + countL + 1) // 2
            half2 = (countR + countL) - half1
            if countR > countL:
                if (countR - 1) % 2 == 0:
                    res += [0] * (countR - 1) + [half1, half2] + [0] * (countL - 1)
                else:
                    res += [0] * (countR - 1) + [half2, half1] + [0] * (countL - 1)
            else:
                if (countL - 1) % 2 == 0:
                    res += [0] * (countR - 1) + [half2, half1] + [0] * (countL - 1)
                else:
                    res += [0] * (countR - 1) + [half1, half2] + [0] * (countL - 1)
    return res


if __name__ == "__main__":
    output = main()
    print((" ".join(map(str, output))))

def main():
    S = eval(input())
    n = len(S)
    i = 0
    ans = [0 for _ in range(n)]
    while i < n:
        countL, countR = 0, 0
        while i < n and S[i] == "R":
            countR += 1
            i += 1
        while i < n and S[i] == "L":
            countL += 1
            i += 1
        if abs(countL - countR) % 2 == 0:
            cL, cR = (countL + countR) // 2, (countL + countR) // 2
        else:
            c = (countL + countR + 1) // 2
            if countR > countL:
                if countR % 2 == 1:
                    cR, cL = c, c - 1
                else:
                    cR, cL = c - 1, c
            else:
                if countL % 2 == 1:
                    cR, cL = c - 1, c
                else:
                    cR, cL = c, c - 1
        ans[i - countL] = cL
        ans[i - countL - 1] = cR
    return " ".join(map(str, ans))


if __name__ == "__main__":
    print((main()))

-    res = [] -    while i < len(S): +    ans = [0 for _ in range(n)] +    while i < n: -        if (countL + countR) % 2 == 0: -            half = (countL + countR) // 2 -            res += [0] * (countR - 1) + [half] * 2 + [0] * (countL - 1) +        if abs(countL - countR) % 2 == 0: +            cL, cR = (countL + countR) // 2, (countL + countR) // 2 -            half1 = (countR + countL + 1) // 2 -            half2 = (countR + countL) - half1 +            c = (countL + countR + 1) // 2 -                if (countR - 1) % 2 == 0: -                    res += [0] * (countR - 1) + [half1, half2] + [0] * (countL - 1) +                if countR % 2 == 1: +                    cR, cL = c, c - 1 -                    res += [0] * (countR - 1) + [half2, half1] + [0] * (countL - 1) +                    cR, cL = c - 1, c -                if (countL - 1) % 2 == 0: -                    res += [0] * (countR - 1) + [half2, half1] + [0] * (countL - 1) +                if countL % 2 == 1: +                    cR, cL = c - 1, c -                    res += [0] * (countR - 1) + [half1, half2] + [0] * (countL - 1) -    return res +                    cR, cL = c, c - 1 +        ans[i - countL] = cL +        ans[i - countL - 1] = cR +    return " ".join(map(str, ans)) -    output = main() -    print((" ".join(map(str, output)))) +    print((main()))