S = input() N = len(S) L = [i for i in range(2**N, (2**N)*2)] M = len(L)//2 for i in range(N): if S[i] == 'L': L = L[:M] else: L = L[M:] print(*L)