#include <bits/stdc++.h>
int main() {
  char s[1000001];
  scanf(" %s", s);
  int L = strlen(s);
  int arr[L], j = L - 1, k = 0;
  for (int i = 0; i < L; i++) {
    if (s[i] == 'l') {
      arr[j] = i + 1;
      j--;
    } else if (s[i] == 'r') {
      arr[k] = i + 1;
      k++;
    }
  }
  for (int i = 0; i < L; i++) {
    printf("%d\n", arr[i]);
  }
  return 0;
}
