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.util.*;
import java.io.*;
import java.math.*;

public class Main{

	char c[];
	public void run(){
		Scanner in = new Scanner(System.in);
		c = in.next().toCharArray();

		int n = c.length;
		/*
		F ks[] = new F[n];
		ks[0] = new F(1, 2, 0);
		F k = new F(1, 2, 0);
		F d = new F(1, 2, 0);
		F l = new F(0, 1, 0);
		F r = new F(1, 1, 0);

		for(int i=0;i<n-1;i++){
			if (c[i] == 'l'){
				//l = sub(k, d);
				//r = new F(k);
			}else{
				//l = new F(k);
				///r = add(k, d);
			}
			//k = getNextK(l, r);
			//ks[i+1] = new F(k.num, k.den, i+1);
			d.den*=2;
			//System.out.println(l + " - " + r + " | " + k + " | " + d + " " + c[i]);
		}
		*/
		PrintWriter out = new PrintWriter(System.out);
		//for(int i=0;i<n;i++)
		//	System.out.println(ks[i]);
		//Arrays.sort(ks);
		for(int i=0;i<n;i++){
			if (c[i] == 'r') {
				out.println(i+1);
			}
		}
		for(int i=n-1;i>=0;i--){
			if (c[i] == 'l'){
				out.println(i+1);
			}
		}
		out.close();
	}

	public F getNextK(F l, F r){
		F k = add(l, r);
		k.den*=2;
		return cancel(k);
	}

	private F add(F l, F r){
		if (l.den == r.den) {
			return cancel(new F(l.num + r.num, l.den, 0));
		}
		long k = nok(l.den, r.den);
		return cancel(new F((l.num*k)/l.den + (r.num*k)/r.den, k, 0));
	}

	private F sub(F l, F r){
		r.num = -r.num;
		F ret = add(l, r);
		r.num = -r.num;
		return ret;
	}

	private F cancel(F a){
		long k = nod(a.num, a.den);
		a.num/=k;
		a.den/=k;
		return new F(a);
	}

	private long nok(long a, long b){
		return (a*b)/nod(a, b);
	}

	private long nod(long a, long b){
		return (a%b == 0) ? b : nod(b, a%b);
	}

	public static void main(String[] args) {
		new Main().run();
	}
}

class F implements Comparable<F>{
	public long den, num;
	public int idx;
	public F(long num, long den, int idx){
		this.num = num;
		this.den = den;
		this.idx = idx;
	}

	public F(F a) {
		this.num = a.num;
		this.den = a.den;
		this.idx = a.idx;
	}

	public String toString(){
		return this.num + "/" + this.den;// + " idx is " + this.idx;
	}

	public int compareTo(F o) {
		double d1 = 1.*this.num/this.den;
		double d2 = 1.*o.num/o.den;

		if (d1 < d2) return -1;
		return 1;
	}
}