#include <bits/stdc++.h>
using namespace std;
struct Vec {
  double x, y;
  int id;
  Vec(double a, double b) : x(a), y(b), id(-1) {}
  Vec() : x(0), y(0), id(-1) {}
};
bool operator<(Vec a, Vec b) { return a.x < b.x; }
Vec operator-(Vec a, Vec b) { return Vec(a.x - b.x, a.y - b.y); }
Vec rot_ccw(Vec a, double r) {
  return Vec(a.x * cos(r) - a.y * sin(r), a.x * sin(r) + a.y * cos(r));
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  vector<Vec> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i].x >> a[i].y;
    a[i].id = i;
  }
  sort(a.begin(), a.end());
  string s;
  cin >> s;
  Vec cur = a.back();
  a.pop_back();
  vector<int> p;
  p.push_back(cur.id);
  for (int i = 0; i < n - 2; ++i) {
    Vec ref = a[0];
    double aref = atan2(ref.y - cur.y, ref.x - cur.x);
    vector<pair<double, Vec> > cp_a;
    for (int j = 0; j < int(a.size()); ++j) {
      Vec dir = rot_ccw(a[j] - cur, -aref);
      cp_a.push_back(make_pair(atan2(dir.y, dir.x), a[j]));
    }
    sort(cp_a.begin(), cp_a.end());
    if (s[i] == 'L') {
      cur = cp_a[0].second;
    } else {
      cur = cp_a.back().second;
    }
    p.push_back(cur.id);
    a = vector<Vec>();
    for (int j = 0; j < int(cp_a.size()); ++j) {
      if (cp_a[j].second.id != cur.id) {
        a.push_back(cp_a[j].second);
      }
    }
  }
  p.push_back(a[0].id);
  for (int i = 0; i < n; ++i) {
    if (i > 0) cout << " ";
    cout << p[i] + 1;
  }
  cout << endl;
}
