#include <bits/stdc++.h>
const int maxn = 1000005;
char map[maxn];
int next[maxn], pre, now;
void add_pre(int num) {
  next[num] = next[pre];
  next[pre] = num;
  now = num;
}
void add_aft(int num) {
  next[num] = next[now];
  next[now] = num;
  pre = now;
  now = num;
}
int main() {
  int len;
  scanf("%s", map);
  len = strlen(map);
  pre = 0;
  now = 1;
  memset(next, -1, sizeof(next));
  next[0] = 1;
  for (int i = 0; i < len - 1; i++) {
    if (map[i] == 'l')
      add_pre(i + 2);
    else
      add_aft(i + 2);
  }
  for (int i = next[0]; i != -1; i = next[i]) printf("%d\n", i);
  return 0;
}
