#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1000005];
  string s;
  cin >> s;
  int n = s.size();
  int x = -1, y = n;
  for (int i = 0; n > i; i++) {
    if (s[i] == 'l')
      a[++x] = i + 1;
    else
      a[--y] = i + 1;
  }
  for (int i = n - 1; i >= 0; i--) cout << a[i] << '\n';
  return 0;
}
