#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000005;
int ans[MAX], l, r, len;
char s[MAX];
int main() {
  scanf("%s", &s);
  len = strlen(s);
  l = 0;
  r = len - 1;
  for (int i = 0; i < len; i++)
    if (s[i] == 'l') {
      ans[r] = i + 1;
      r--;
    } else {
      ans[l] = i + 1;
      l++;
    }
  for (int i = 0; i < len; i++) printf("%d\n", ans[i]);
  return 0;
}
