Squirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, *n* stones will fall and Liss will escape from the stones. The stones are numbered from 1 to *n* in order.

The stones always fall to the center of Liss's interval. When Liss occupies the interval [*k* - *d*, *k* + *d*] and a stone falls to *k*, she will escape to the left or to the right. If she escapes to the left, her new interval will be [*k* - *d*, *k*]. If she escapes to the right, her new interval will be [*k*, *k* + *d*].

You are given a string *s* of length *n*. If the *i*-th character of *s* is "l" or "r", when the *i*-th stone falls Liss will escape to the left or to the right, respectively. Find the sequence of stones' numbers from left to right after all the *n* stones falls.
The input consists of only one line. The only line contains the string *s* (1 ≤ |*s*| ≤ 10<sup class="upper-index">6</sup>). Each character in *s* will be either "l" or "r".
def gcd(a, b):
    """Calculate the Greatest Common Divisor of a and b.

    Unless b==0, the result will have the same sign as b (so that when
    b is divided by it, the result comes out positive).
    """
    while b:
        a, b = b, a%b
    return a


class a:
    def __init__(self, a, b):
        self.a = a
        self.b = b
        
    def __add__(self, el):
        
        temp = el.b * self.a + self.b * el.a
        den = el.b * self.b
        
        k = gcd(den, temp)
        temp = temp // k
        den = den // k
        
        return a(temp, den)
    
    def __floordiv__(self, n):
        self.b *= 2
    def __truediv__(self, n): 
        return a(self.a, self.b * 2)
    def __lt__(self, b):
        if self.a * b.b > b.a * self.b:
            return False
        else:
            return True
    


s = input()

l = a(0,1)
r = a(1,1)

ab = []

for i in range(len(s)):
    cur = (r+l)/2
    ab.append((i+1, cur))
    if s[i] == 'l':
        r = (r+l) / 2
    else:
        l = (r+l) / 2
        

print('\n'.join([str(x[0]) for x in sorted(ab, key=lambda x: x[1])]))  