#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int Left[N], Right[N];
void pre(int node) {
  if (node == -1) return;
  pre(Left[node]);
  printf("%d\n", node + 1);
  pre(Right[node]);
}
int main() {
  memset(Left, -1, sizeof Left);
  memset(Right, -1, sizeof Right);
  string s;
  cin >> s;
  for (int i = 0; i + 1 < (int)s.size(); ++i)
    if (s[i] == 'l')
      Left[i] = i + 1;
    else
      Right[i] = i + 1;
  pre(0);
  return 0;
}
