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.

Input

The input consists of only one line. The only line contains the string s (1 ≤ |s| ≤ 106). Each character in s will be either "l" or "r".

Output

Output n lines — on the i-th line you should print the i-th stone's number from the left.

Examples

Input

llrlr


Output

3
5
4
2
1


Input

rrlll


Output

1
2
5
4
3


Input

lrlrr


Output

2
4
5
3
1

Note

In the first example, the positions of stones 1, 2, 3, 4, 5 will be <image>, respectively. So you should print the sequence: 3, 5, 4, 2, 1.

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class Main {

	static class DList<V> {
		DNode<V> head;
		DNode<V> current;

		static class DNode<V> {
			V value;
			DNode<V> prev;
			DNode<V> next;
			
			public String toString()
			{
				return (prev != null? String.valueOf(prev.value) : "/") + value + (next != null? String.valueOf(next.value) : "/");
			}
		}
		
		void prepand(V value)
		{
			DNode<V> newNod = new DNode<V>();
			newNod.value = value;
			
			newNod.next = current;
			if(current != null) 
			{
				newNod.prev = current.prev;
				current.prev = newNod;
			}
			
			if(newNod.prev == null)
			{
				head = newNod;
			}
			else
			{
				newNod.prev.next = newNod;
			}
			
			current = newNod;
		}
		
		void appand(V value)
		{
			DNode<V> newNod = new DNode<V>();
			newNod.value = value;
			
			newNod.prev = current;
			if(current != null)
			{
				if(current.next != null)
					current.next.prev = newNod;
				
				newNod.next = current.next;
				current.next = newNod;
			}
			else
			{
				head = newNod;
			}
			current = newNod;
		}

	}
	public static void solve(FastScanner fscan, BufferedWriter bw) throws IOException {
		double l = 0;
		double r = 100000000;
		double mid = (l + r) / 2.0;
		
		DList<Integer> list = new DList<Integer>();
		
		list.appand(1);
		String s = fscan.nextString();
		for (int i = 1; i < s.length(); i++) {
			
			if(s.charAt(i-1) == 'l')
			{
				r = mid;
				list.prepand(i+1);
			}
			else
			{
				l = mid;
				list.appand(i+1);
			}
			mid = (l + r) / mid;
		}
		
		DList.DNode<Integer> d = list.head;
		while(d != null )
		{
			bw.append(String.valueOf(d.value) + "\n");
			d = d.next;
		}
	}
	
	/**************** ENTER HERE   ********************/
	public static void main(String[] args) throws Exception {
		
		if(args.length != 0){
			test();
			return;
		}
		
		FastScanner fscan = new FastScanner(System.in);
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		solve(fscan,bw);
		bw.close();
	}
	
	/****   Test Static test cases      **/
	public static void test() throws IOException{
		String testcase[] = new String[]{};
		String answer[] = new String[]{};
		
		for (int i = 0; i < testcase.length; i++) {
			ByteArrayOutputStream result = new ByteArrayOutputStream();
			FastScanner fscan = new FastScanner(new ByteArrayInputStream(testcase[i].getBytes()));
			BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(result));
			
			solve(fscan, bw);
			
			String r = new String(result.toByteArray());
			if(! r.equals(answer[i])){
				String q = testcase[i];
				String a = answer[i];

				System.err.println("Wrong Answer on test:"+(i+1));
				System.err.println("Q:"+q);
				System.err.println("A:"+a);
				System.err.println("R:"+r);
			}
			
		}

	}
}





class FastScanner {
	InputStream is;
	byte buff[] = new byte[1024];
	int currentChar = -1;
	int buffChars = 0;

	public FastScanner(InputStream inputStream) {
		is = inputStream;
	}

	public boolean hasNext() throws IOException {
		return currentChar == -1 || buffChars > 0;
	}

	public char nextChar() throws IOException {
		// if we already have that next char read, just return else input
		if (currentChar == -1 || currentChar >= buffChars) {
			currentChar = 0;
			buffChars = is.read(buff);
		}

		if (buffChars <= 0) {
			throw new RuntimeException("No char found...");
		}

		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;
		return (char) ch;
	}

	public int nextCharAsInt() throws IOException {
		// if we already have that next char read, just return else input
		if (currentChar == -1 || currentChar >= buffChars) {
			currentChar = 0;
			buffChars = is.read(buff);
		}

		if (buffChars <= 0) {
			return -1;
		}
		return (char) buff[currentChar++];
	}

	public String nextLine() throws IOException {
		StringBuilder bldr = new StringBuilder();
		int ch;
		while (isLineEnd(ch = nextCharAsInt()))
			// ignore empty lines ???
			;

		do {
			bldr.append((char) ch);
		} while (!isLineEnd(ch = nextCharAsInt()));

		return bldr.toString();
	}

	public String nextString() throws IOException {
		StringBuilder bldr = new StringBuilder();
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		do {
			bldr.append((char) ch);
		} while (!isSpace(ch = nextCharAsInt()));

		return bldr.toString();
	}

	public int nextInt() throws IOException {
		// considering ASCII files--> 8 bit chars, unicode files has 16 bit
		// chars (byte1 then byte2)
		int result = 0;
		int sign = 1;
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		if (ch == '-') {
			sign = -1;
			ch = nextCharAsInt();
		}

		do {
			if (ch < '0' || ch > '9')
				throw new NumberFormatException("Found '" + ch
						+ "' while parsing for int.");

			result *= 10;
			result += ch - '0';
		} while (!isSpace(ch = nextCharAsInt()));

		return sign * result;
	}

	public long nextLong() throws IOException {
		// considering ASCII files--> 8 bit chars, unicode files has 16 bit
		// chars (byte1 then byte2)
		long result = 0;
		int sign = 1;
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		if (ch == '-') {
			sign = -1;
			ch = nextCharAsInt();
		}

		do {
			if (ch < '0' || ch > '9')
				throw new NumberFormatException("Found '" + ch
						+ "' while parsing for int.");

			result *= 10;
			result += ch - '0';
		} while (!isSpace(ch = nextCharAsInt()));

		return sign * result;
	}

	private boolean isLineEnd(int ch) {
		return ch == '\n' || ch == '\r' || ch == -1;
	}

	private boolean isSpace(int ch) {
		return ch == '\n' || ch == ' ' || ch == '\t' || ch == '\r' || ch == -1;
	}

	public void close() throws IOException {
		is.close();
	}
}
