#include <bits/stdc++.h>
using namespace std;
char s[1000010];
int a[1000010];
int l, r;
int main() {
  cin >> s;
  int len = strlen(s);
  l = 1;
  r = len;
  for (int i = 0; i < len; i++) {
    if (s[i] == 'l') {
      a[r--] = i + 1;
    }
    if (s[i] == 'r') {
      a[l++] = i + 1;
    }
  }
  for (int i = 1; i <= len; i++) cout << a[i] << endl;
  return 0;
}
