#include <bits/stdc++.h>
using namespace std;
struct Point {
  int index;
  long long val;
};
long long gcd(long long a, long long b) {
  if (!b) {
    return a;
  }
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
bool cmp2(Point& p1, Point& p2) { return p1.val < p2.val; }
struct Node {
  int value;
  Node* next;
  Node* prev;
};
int main() {
  string s;
  cin >> s;
  int n = s.length();
  Node* head = new Node();
  head->value = 0;
  head->next = nullptr;
  head->prev = nullptr;
  Node* track = new Node();
  track->value = 1;
  track->next = nullptr;
  track->prev = head;
  head->next = track;
  bool goLeft = true;
  if (s[0] == 'l') {
    goLeft = true;
  } else {
    goLeft = false;
  }
  for (int i = 1; i < n; ++i) {
    Node* node = new Node();
    node->value = i + 1;
    node->next = nullptr;
    node->prev = nullptr;
    if (goLeft) {
      node->prev = track->prev;
      node->next = track;
      if (track->prev) {
        track->prev->next = node;
      }
      track->prev = node;
      track = node;
    } else {
      node->next = track->next;
      if (track->next) {
        track->next->prev = node;
      }
      track->next = node;
      node->prev = track;
      track = node;
    }
    if (s[i] == 'l') {
      goLeft = true;
    } else {
      goLeft = false;
    }
  }
  track = head->next;
  while (track) {
    cout << track->value << '\n';
    track = track->next;
  }
  return 0;
}
