#include <bits/stdc++.h>
using namespace std;
int h[100005];
pair<int, int> p[1000005];
int sta[1000005];
int v[1000005];
void dfs(int st) {
  int top = 0;
  sta[top++] = st;
  int second;
  while (top > 0) {
    second = sta[top - 1];
    if (p[second].first == -1 && p[second].second == -1) {
      cout << sta[--top] + 1 << endl;
    } else if (p[second].first != -1) {
      sta[top++] = p[second].first;
      p[second].first = -1;
    } else if (p[second].second != -1) {
      cout << second + 1 << endl;
      top--;
      sta[top++] = p[second].second;
    }
  }
}
int main() {
  string s;
  cin >> s;
  int second = 0;
  for (int i = 0; i < (s.size() - 1); i++) {
    if (s[i] == 'l')
      p[second] = make_pair(i + 1, -1);
    else
      p[second] = make_pair(-1, i + 1);
    second = i + 1;
  }
  p[second] = make_pair(-1, -1);
  dfs(0);
}
