Buggy python submission (verdict: Time Limit Exceeded):
maps = input()
people = [{'pos': i, 'prev': -1, 'loop': -1} for i in range(len(maps))]
max_count = 10**100


def update(people, index):
    for p in people:
        if maps[p['pos']] == 'R':
            if p['prev'] == p['pos'] + 1:
                p['loop'] = index
            p['prev'] = p['pos']
            p['pos'] += 1
        else:
            if p['prev'] == p['pos'] - 1:
                p['loop'] = index
            p['prev'] = p['pos']
            p['pos'] -= 1


def get_output(people):
    output = [0] * len(people)

    for p in people:
        output[p['pos']] += 1

    return ' '.join(str(i) for i in output)


for index in range(max_count):
    # print(index, 'before', get_output(people))
    update(people, index)
    # print(index, 'after', get_output(people))

    if len([p for p in people if p['loop'] < 0]) == 0:
        # print(get_output(people))
        for p in people:
            mod = (max_count - p['loop'] + 1) % 2
            # print(mod)
            for i in range(mod):
                if maps[p['pos']] == 'R':
                    p['prev'] = p['pos']
                    p['pos'] += 1
                else:
                    p['prev'] = p['pos']
                    p['pos'] -= 1
        # print(get_output(people))
        break

print(get_output(people))


Fixed submission:
maps = input()
people = [0] * len(maps)

counter = 0
for i in range(len(maps)):
    if maps[i] == 'R':
        counter += 1
        if maps[i+1] == 'L':
            people[i] += (counter+1) // 2
            people[i+1] += counter // 2
    else:
        counter = 0

counter = 0
for i in range(len(maps) - 1, 0, -1):
    if maps[i] == 'L':
        counter += 1
        if maps[i-1] == 'R':
            people[i] += (counter+1) // 2
            people[i-1] += counter // 2
    else:
        counter = 0

print(*people)

Buggy python submission (verdict: Time Limit Exceeded):
maps = [s for s in str(input())]
people = [{'pos': i, 'prev': -1, 'loop': -1} for i in range(len(maps))]
max_count = 10**100


def update(people, index):
    for p in people:
        if maps[p['pos']] == 'R':
            if p['prev'] == p['pos'] + 1:
                p['loop'] = index
            p['prev'] = p['pos']
            p['pos'] += 1
        else:
            if p['prev'] == p['pos'] - 1:
                p['loop'] = index
            p['prev'] = p['pos']
            p['pos'] -= 1


def get_output(people):
    output = [0] * len(people)

    for p in people:
        output[p['pos']] += 1

    return ' '.join(str(i) for i in output)


for index in range(max_count):
    # print(index, 'before', get_output(people))
    update(people, index)
    # print(index, 'after', get_output(people))

    if len([p for p in people if p['loop'] < 0]) == 0:
        # print(get_output(people))
        for p in people:
            mod = (max_count - p['loop'] + 1) % 2
            # print(mod)
            for i in range(mod):
                if maps[p['pos']] == 'R':
                    p['prev'] = p['pos']
                    p['pos'] += 1
                else:
                    p['prev'] = p['pos']
                    p['pos'] -= 1
        # print(get_output(people))
        break

print(get_output(people))


Fixed submission:
maps = input()
people = [0] * len(maps)

counter = 0
for i in range(len(maps)):
    if maps[i] == 'R':
        counter += 1
        if maps[i+1] == 'L':
            people[i] += (counter+1) // 2
            people[i+1] += counter // 2
    else:
        counter = 0

counter = 0
for i in range(len(maps) - 1, 0, -1):
    if maps[i] == 'L':
        counter += 1
        if maps[i-1] == 'R':
            people[i] += (counter+1) // 2
            people[i-1] += counter // 2
    else:
        counter = 0

print(*people)

Buggy python submission (verdict: Time Limit Exceeded):
maps = [s for s in str(input())]
people = [1] * len(maps)
store = {}
max_count = 10**100


def update(people):
    n_people = [0] * len(maps)
    for i in range(len(people)):
        for n in range(people[i]):
            if maps[i] == 'R':
                n_people[i] -= 1
                n_people[i+1] += 1
            else:
                n_people[i] -= 1
                n_people[i-1] += 1
    return [people[i] + n_people[i] for i in range(len(people))]


for c in range(max_count):
    people = update(people)
    map_key = ''.join(str(i) for i in people)
    if map_key in store:
        mod = round((max_count - c + 1) % (c - store[map_key]))
        for i in range(mod):
            people = update(people)
        break
    store[map_key] = c

print(' '.join(str(i) for i in people))


Fixed submission:
maps = input()
people = [0] * len(maps)

counter = 0
for i in range(len(maps)):
    if maps[i] == 'R':
        counter += 1
        if maps[i+1] == 'L':
            people[i] += (counter+1) // 2
            people[i+1] += counter // 2
    else:
        counter = 0

counter = 0
for i in range(len(maps) - 1, 0, -1):
    if maps[i] == 'L':
        counter += 1
        if maps[i-1] == 'R':
            people[i] += (counter+1) // 2
            people[i-1] += counter // 2
    else:
        counter = 0

print(*people)