#include <bits/stdc++.h>
using namespace std;
char s[1000010];
int L[1000010];
int R[1000010];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  memset(L, -1, sizeof(L));
  memset(R, -1, sizeof(R));
  int now = 1;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'l') {
      if (L[now] == -1) {
        L[now] = now + 1;
        R[now + 1] = now;
      } else {
        int l = L[now];
        R[l] = now + 1;
        L[now] = now + 1;
        L[now + 1] = l;
        R[now + 1] = now;
      }
    } else {
      if (R[now] == -1) {
        R[now] = now + 1;
        L[now + 1] = now;
      } else {
        int r = R[now];
        L[r] = now + 1;
        R[now] = now + 1;
        L[now + 1] = now;
        R[now + 1] = r;
      }
    }
    now++;
  }
  int at = 1;
  while (L[at] != -1) at = L[at];
  while (at != -1) {
    printf("%d\n", at);
    at = R[at];
  }
  return 0;
}
