#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  getline(cin, a);
  int n, i;
  n = a.length();
  stack<int> b;
  for (i = 0; i < n; i++) {
    if (a[i] == 'r') printf("%d\n", i + 1);
    if (a[i] == 'l') {
      b.push(i + 1);
    }
  }
  while (b.size()) {
    cout << b.top() << "\n";
    b.pop();
  }
}
