#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> operator-(pair<long long, long long> &a,
                                     pair<long long, long long> &b) {
  return pair<long long, long long>(a.first - b.first, a.second - b.second);
}
long long cross(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first * b.second - b.first * a.second;
}
int n;
pair<long long, long long> coord[2010];
bool mark[2010];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> coord[i].first >> coord[i].second;
  int curpos = 1;
  for (int i = 2; i <= n; i++)
    if (coord[i].second < coord[curpos].second) curpos = i;
  char dir;
  for (int it = 2; it < n; it++) {
    cin >> dir;
    mark[curpos] = true;
    int op = (dir == 'L' ? 1 : -1), nxtpos = -1;
    for (int i = 1; i <= n; i++) {
      if (mark[i]) continue;
      if (nxtpos == -1)
        nxtpos = i;
      else if (cross(coord[nxtpos] - coord[curpos], coord[i] - coord[curpos]) *
                   op <
               0)
        nxtpos = i;
    }
    cout << curpos << ' ';
    curpos = nxtpos;
  }
  cout << curpos << ' ';
  mark[curpos] = true;
  for (int i = 1; i <= n; i++)
    if (!mark[i]) {
      cout << i << endl;
      break;
    }
  return 0;
}
