#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 998244353;
const double PI = acos(-1);
const int INF = 0x3f3f3f3f;
const int NINF = 0x3f3f3f40;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll NINFLL = 0x3f3f3f3f3f3f3f40;
const int mxN = 2001;
string s;
int n;
pair<int, int> curr;
ll ccw(pair<int, int> a, pair<int, int> b) {
  return 1LL * a.first * b.second - 1LL * b.first * a.second;
}
vector<int> ans;
bool flag[mxN];
pair<int, int> arr[mxN];
int main() {
  mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  int x, y;
  int curr = -1;
  pair<int, int> low = {INF, INF};
  for (int i = (0); i < (n); ++i) {
    cin >> x >> y;
    arr[i] = {x, y};
    if (arr[i] < low) {
      low = arr[i];
      curr = i;
    }
  }
  ans.push_back(curr);
  cin >> s;
  for (int i = (0); i < (n - 2); ++i) {
    flag[curr] = true;
    int nxt = -1;
    for (int j = (0); j < (n); ++j) {
      if (flag[j]) continue;
      if (nxt == -1)
        nxt = j;
      else {
        ll dir = 1LL * (arr[j].first - arr[curr].first) *
                     (arr[nxt].second - arr[curr].second) -
                 1LL * (arr[j].second - arr[curr].second) *
                     (arr[nxt].first - arr[curr].first);
        if (s[i] == 'R') {
          dir = -dir;
        }
        if (dir > 0) nxt = j;
      }
    }
    curr = nxt;
    ans.push_back(nxt);
  }
  flag[curr] = true;
  for (int i = (0); i < (n); ++i) {
    if (flag[i]) continue;
    ans.push_back(i);
  }
  for (int k : ans) {
    cout << (k + 1) << " ";
  }
  return 0;
}
