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