#include <bits/stdc++.h>
int left[1000010], right[1000010], Left = 1, Right = 1000010, rank[1000010];
int main() {
  char c = getchar();
  int cur = 1, n;
  memset(left, 0, sizeof(left));
  memset(right, 0, sizeof(right));
  while (c != '\n') {
    if (c == 'l')
      right[cur] = Right--;
    else
      left[cur] = Left++;
    ++cur;
    c = getchar();
  }
  n = cur - 1;
  for (int i = 1; i <= n; ++i)
    if (left[i])
      rank[left[i]] = i;
    else
      rank[right[i] - 1000010 + n] = i;
  for (int i = 1; i <= n; ++i) printf("%d\n", rank[i]);
  return 0;
}
