#include <bits/stdc++.h>
using namespace std;
int poz, mas[1000019], br = 1, l, r = 1000010;
int main() {
  char a;
  while (1) {
    cin.get(a);
    if (a != 'l' && a != 'r') break;
    if (a == 'l') {
      mas[l] = br;
      l++;
    }
    if (a == 'r') {
      mas[r] = br;
      r--;
    }
    br++;
  }
  for (int i = 1000018; i >= 0; i--) {
    if (mas[i] != 0) cout << mas[i] << endl;
  }
  return 0;
}
