Squirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, n stones will fall and Liss will escape from the stones. The stones are numbered from 1 to n in order.

The stones always fall to the center of Liss's interval. When Liss occupies the interval [k - d, k + d] and a stone falls to k, she will escape to the left or to the right. If she escapes to the left, her new interval will be [k - d, k]. If she escapes to the right, her new interval will be [k, k + d].

You are given a string s of length n. If the i-th character of s is "l" or "r", when the i-th stone falls Liss will escape to the left or to the right, respectively. Find the sequence of stones' numbers from left to right after all the n stones falls.

Input

The input consists of only one line. The only line contains the string s (1 ≤ |s| ≤ 106). Each character in s will be either "l" or "r".

Output

Output n lines — on the i-th line you should print the i-th stone's number from the left.

Examples

Input

llrlr


Output

3
5
4
2
1


Input

rrlll


Output

1
2
5
4
3


Input

lrlrr


Output

2
4
5
3
1

Note

In the first example, the positions of stones 1, 2, 3, 4, 5 will be <image>, respectively. So you should print the sequence: 3, 5, 4, 2, 1.
#include <bits/stdc++.h>
using namespace std;
void A_1353() {
  int t;
  cin >> t;
  while (t--) {
    long n, m;
    cin >> n >> m;
    if (n == 1) {
      cout << 0 << endl;
    } else if (n == 2) {
      cout << m << endl;
    } else {
      cout << 2LL * m << endl;
    }
  }
}
void B_1353() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    vector<int> b(n);
    for (auto &x : a) {
      cin >> x;
    }
    for (auto &y : b) {
      cin >> y;
    }
    int sum = 0;
    sort(a.begin(), a.end());
    sort(b.begin(), b.end(), greater<int>());
    for (int i = 0; i < n; i++) {
      if (i < k) {
        sum += max(a[i], b[i]);
      } else {
        sum += a[i];
      }
    }
    cout << sum << endl;
  }
}
void B_1343() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int half = n / 2;
    if (half % 2 == 1) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      vector<int> res;
      int count = 2;
      while (half--) {
        res.push_back(count);
        count += 2;
      }
      int odd = 1;
      int oddcount = n / 2;
      while (oddcount--) {
        res.push_back(odd);
        odd += 2;
      }
      res[res.size() - 1] += n / 2;
      for (auto x : res) {
        cout << x << " ";
      }
      cout << endl;
    }
  }
}
void A_1372() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cout << 1 << " ";
    }
    cout << endl;
  }
}
void A_1497() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a.begin(), a.end());
    vector<int> b;
    for (int i = 0; i < a.size(); i++) {
      if (i == 0 || a[i] != a[i - 1]) {
        b.emplace_back(a[i]);
      }
    }
    for (int i = 0; i < a.size(); i++) {
      if (i > 0 && a[i] == a[i - 1]) {
        b.emplace_back(a[i]);
      }
    }
    for (auto x : b) {
      cout << x << " ";
    }
    cout << endl;
  }
}
void A_1493() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    cout << n - k + k / 2 << endl;
    for (int i = k + 1; i <= n; ++i) {
      cout << i << " ";
    }
    for (int i = (k + 1) / 2; i < k; ++i) {
      cout << i << " ";
    }
    cout << endl;
  }
}
void A_1538() {
  int t;
  cin >> t;
  while (t--) {
    long long n, l, r;
    cin >> n >> l >> r;
    long long arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + n);
  }
}
void A_680() {
  int arr[5];
  int n = 5;
  int sum = 0;
  for (int i = 0; i < 5; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int best = sum;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (arr[i] == arr[j]) {
        best = min(best, sum - 2 * arr[i]);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      for (int k = j + 1; k < n; k++) {
        if (arr[i] == arr[j] && arr[i] == arr[k]) {
          best = min(best, sum - 3 * arr[i]);
        }
      }
    }
  }
  cout << best;
}
void A_1081() {
  long long n;
  cin >> n;
  if (n == 2) {
    cout << "2";
  } else {
    cout << "1";
  }
}
void solve() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    if (m % n == 0) {
      cout << 0 << endl;
    } else {
      int mini = *min_element(arr, arr + n);
      cout << mini * (n - 1) << endl;
    }
  }
}
void A_264() {
  string str;
  cin >> str;
  vector<int> v1, v2;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == 'l') {
      v1.push_back(i + 1);
    } else {
      v2.push_back(i + 1);
    }
  }
  for (auto x : v2) {
    cout << x << "\n";
  }
  reverse(v1.begin(), v1.end());
  for (auto x2 : v1) {
    cout << x2 << "\n";
  }
}
int main() { A_264(); }
