#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[] = {1, 0, -1, 0, 1, -1, 1, -1};
long long fix_mod(long long x, long long y) { return (y + x % y) % y; }
void fast() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
pair<int, int> arr[(int)1e6 + 1];
int main() {
  fast();
  string s;
  cin >> s;
  int x = 1;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == 'l') {
      int z = arr[x].first;
      arr[z].second = x + 1;
      arr[x].first = x + 1;
      arr[x + 1].first = z;
      arr[x + 1].second = x;
      x++;
    } else {
      int z = arr[x].second;
      arr[z].first = x + 1;
      arr[x].second = x + 1;
      arr[x + 1].second = z;
      arr[x + 1].first = x;
      x++;
    }
  }
  for (int i = 1; i <= s.size(); i++) {
    if (arr[i].first == 0) {
      x = i;
      break;
    }
  }
  for (int i = 1; i <= s.size(); i++) {
    cout << x << "\n";
    x = arr[x].second;
  }
}
