#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
pair<int, int> p[N], prv, cur;
bool mark[N];
string s;
int n;
inline void set_mark(int id) {
  prv = cur, cur = p[id];
  mark[id++] = true;
  cout << id << ' ';
}
inline 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);
}
inline void read_input() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  cin >> s;
}
inline void solve() {
  int st = 0;
  for (int i = 1; i < n; i++)
    if (p[i] < p[st]) st = i;
  set_mark(st);
  prv = {p[st].first, -2e9};
  for (int i = 0; i < n - 1; i++) {
    int nxt = -1;
    for (int j = 0; j < n; j++)
      if (!mark[j] && (!~nxt || go_right(cur, p[nxt], p[j]) ^ (s[i] == 'R')))
        nxt = j;
    set_mark(nxt);
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  read_input(), solve();
  return 0;
}
