#include <bits/stdc++.h>
using namespace std;
int n, nxt, cur;
bool mark[2222];
pair<int, int> p[2222];
string s;
void set_mark(int id) { mark[cur = id] = true, cout << ++id << ' '; }
bool go_right(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
  return 1LL * (c.first - b.first) * (a.second - b.second) <=
         1LL * (c.second - b.second) * (a.first - b.first);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    if (p[i] < p[nxt]) nxt = i;
  }
  cin >> s, set_mark(nxt);
  for (int i = 0; i < n - 1; set_mark(nxt), i++)
    for (int j = 0; j < n; j++)
      if (!mark[j] &&
          (mark[nxt] || go_right(p[cur], p[nxt], p[j]) ^ (s[i] == 'R')))
        nxt = j;
}
