#include <bits/stdc++.h>
char str[1000005];
int t[1000005], p[1000005];
int main() {
  gets(str);
  p[1] = 0;
  int now = 2;
  for (int i = 1; str[i]; ++i) {
    if (str[i - 1] == 'l') {
      t[now] = now - 1;
      p[now] = p[now - 1];
      t[p[now - 1]] = now;
      p[now - 1] = now;
    } else {
      p[now] = now - 1;
      t[now] = t[now - 1];
      p[t[now - 1]] = now;
      t[now - 1] = now;
    }
    now++;
  }
  int last;
  for (last = 1; last < 1000005; ++last)
    if (!p[last]) break;
  while (last) {
    printf("%d\n", last);
    last = t[last];
  }
  return 0;
}
