#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  auto A = vector<pair<long long, long long>>(n);
  for (auto& a : A) cin >> a.first >> a.second;
  string D;
  cin >> D;
  auto ans = vector<int>();
  auto V = vector<bool>(n);
  int max_val = numeric_limits<int>::min();
  int max_idx = -1;
  for (auto i = 0; i < n; ++i) {
    if (A[i].first > max_val) {
      max_val = A[i].first;
      max_idx = i;
    }
  }
  ans.emplace_back(max_idx);
  V[max_idx] = true;
  for (auto d : D) {
    auto cand = 0;
    auto p = ans.back();
    while (V[cand]) cand++;
    for (auto i = cand + 1; i < n; ++i) {
      if (V[i]) continue;
      auto ax = A[cand].first - A[p].first;
      auto ay = A[cand].second - A[p].second;
      auto bx = A[i].first - A[p].first;
      auto by = A[i].second - A[p].second;
      auto z = ax * by - ay * bx;
      if (d == 'R' && z > 0)
        cand = i;
      else if (d == 'L' && z < 0)
        cand = i;
    }
    ans.emplace_back(cand);
    V[cand] = true;
  }
  for (auto i = 0; i < n; ++i) {
    if (!V[i]) {
      ans.emplace_back(i);
      V[i] = true;
      break;
    }
  }
  for (auto a : ans) cout << a + 1 << ' ';
  cout << endl;
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
