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".
#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase
# Python implementation of Binary Indexed Tree

# Returns sum of arr[0..index]. This function assumes
# that the array is preprocessed and partial sums of
# array elements are stored in BITree[].
def getsum(BITTree,i):
	s = 0 #initialize result

	# index in BITree[] is 1 more than the index in arr[]
	i = i+1

	# Traverse ancestors of BITree[index]
	while i > 0:

		# Add current element of BITree to sum
		s += BITTree[i]

		# Move index to parent node in getSum View
		i -= i & (-i)
	return s

# Updates a node in Binary Index Tree (BITree) at given index
# in BITree. The given value 'val' is added to BITree[i] and
# all of its ancestors in tree.
def updatebit(BITTree , n , i ,v):

	# index in BITree[] is 1 more than the index in arr[]
	i += 1

	# Traverse all ancestors and add 'val'
	while i <= n:

		# Add 'val' to current node of BI Tree
		BITTree[i] += v

		# Update index to that of parent in update View
		i += i & (-i)


# Constructs and returns a Binary Indexed Tree for given
# array of size n.
def construct(arr, n):

	# Create and initialize BITree[] as 0
	BITTree = [0]*(n+1)

	# Store the actual values in BITree[] using update()
	for i in range(n):
		updatebit(BITTree, n, i, arr[i])

	# Uncomment below lines to see contents of BITree[]
	#for i in range(1,n+1):
	#	 print BITTree[i],
	return BITTree




def binary_search(arr, low, high, x):
 
    # Check base case
    if high >= low:
 
        mid = (high + low) // 2
 
        # If element is present at the middle itself
        if arr[mid] == x:
            return arr[mid]
 
        # If element is smaller than mid, then it can only
        # be present in left subarray
        elif arr[mid] > x:
            return binary_search(arr, low, mid - 1, x)
        
        

          

        

        
      
 
        # Else the element can only be present in right subarray
        else:
            return binary_search(arr, mid + 1, high, x)
 
    else:
        # Element is not present in the array
        return arr[low]
def binary_search2(arr, low, high, x):
    if x<arr[0]:
        return x
 
    # Check base case
    if high >= low:
 
        mid = (high + low) // 2
 
        # If element is present at the middle itself
        if arr[mid] == x:
            return arr[mid]
 
        # If element is smaller than mid, then it can only
        # be present in left subarray
        elif arr[mid] > x:
            return binary_search2(arr, low, mid - 1, x)
        
        

          

        

        
      
 
        # Else the element can only be present in right subarray
        else:
            return binary_search2(arr, mid + 1, high, x)
 
    else:
        # Element is not present in the array
        return arr[high]
class BST:
    def __init__(self,val,key):
        self.val=val
        self.key=key
        self.left=None
        self.right=None
    def insert(self,root,val,key):
        if not root:
            return BST(val,key)
        if val<root.val:
            root.left=self.insert(root.left,val,key)
        else:
            root.right=self.insert(root.right,val,key)
        return root
    def inorder(self,root):
        if root.left!=None:
            self.inorder(root.left)
        print(root.key)
        if root.right!=None:
            self.inorder(root.right)

    
def main():
    # for _ in range(int(input())):
        
    s=input()
    a=BST(0.5,1)
    l,r=0,1
    for i in range(2,len(s)+1):
        if s[i-2]=='l':
            r=(l+r)/2
            a=a.insert(a,(r+l)/2,i)
        else:
            l=(l+r)/2
            a=a.insert(a,(r+l)/2,i)
        # print(l,r)
    a.inorder(a)
    # print(a.left.key)





            


        





        
        







# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    
    
    main()


    
            