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