#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<int> permutation;
  vector<pair<ll, ll>> points(n);
  map<pair<ll, ll>, int> remaining;
  pair<ll, ll> lowest_point = make_pair(1e10, 1e10);
  int lowest_ind = -1, cnt = 1;
  for (auto& point : points) {
    cin >> point.first >> point.second;
    remaining[point] = cnt;
    if (lowest_point.second > point.second) {
      lowest_point = point;
      lowest_ind = cnt;
    }
    cnt++;
  }
  permutation.push_back(lowest_ind);
  string s;
  cin >> s;
  pair<ll, ll> prevPoint = lowest_point;
  remaining.erase(prevPoint);
  for (auto c : s) {
    double bestRadian = 0;
    if (c == 'L') {
      bestRadian = 100;
    } else {
      bestRadian = -100;
    }
    pair<ll, ll> nextPoint;
    int nextIndex = -1;
    for (auto rem : remaining) {
      auto point = rem.first;
      if (nextIndex == -1) {
        nextIndex = rem.second;
        nextPoint = point;
        continue;
      }
      pair<ll, ll> vectorA = {nextPoint.first - prevPoint.first,
                              nextPoint.second - prevPoint.second};
      pair<ll, ll> vectorB = {point.first - prevPoint.first,
                              point.second - prevPoint.second};
      ll crossProduct =
          (vectorA.first * vectorB.second) - (vectorB.first * vectorA.second);
      if (c == 'R') {
        crossProduct *= -1;
      }
      if (crossProduct < 0) {
        nextIndex = rem.second;
        nextPoint = rem.first;
      }
    }
    permutation.push_back(nextIndex);
    remaining.erase(nextPoint);
    prevPoint = nextPoint;
  }
  permutation.push_back(remaining.begin()->second);
  for (auto perm : permutation) {
    cout << perm << " ";
  }
  cout << "\n";
}
