#include <bits/stdc++.h>
using namespace std;
int stk[1001000];
void deal(const string &s) {
  int end = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'l') {
      stk[end++] = i + 1;
    } else if (s[i] == 'r') {
      printf("%d\n", i + 1);
    }
  }
  while (end > 0) {
    printf("%d\n", stk[--end]);
  }
}
int main() {
  string s = "";
  cin >> s;
  deal(s);
  return 0;
}
