#include <bits/stdc++.h>
using namespace std;
template <class T>
struct Point {
  T x, y;
  explicit Point(T x = 0, T y = 0) : x(x), y(y) {}
  bool operator<(Point p) const { return tie(x, y) < tie(p.x, p.y); }
  bool operator==(Point p) const { return tie(x, y) == tie(p.x, p.y); }
  Point operator+(Point p) const { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) const { return Point(x - p.x, y - p.y); }
  Point operator*(T d) const { return Point(x * d, y * d); }
  Point operator/(T d) const { return Point(x / d, y / d); }
  T dot(Point p) const { return x * p.x + y * p.y; }
  T cross(Point p) const { return x * p.y - y * p.x; }
  T cross(Point a, Point b) const { return (a - *this).cross(b - *this); }
};
pair<vector<int>, vector<int> > ulHull(const vector<Point<long long> >& S) {
  vector<int> Q((int)(S).size()), U, L;
  iota(Q.begin(), Q.end(), 0);
  sort(Q.begin(), Q.end(), [&S](int a, int b) { return S[a] < S[b]; });
  for (auto& it : Q) {
    while ((int)(U).size() > 1 &&
           S[U[(int)(U).size() - 2]].cross(S[it], S[U.back()]) <= 0)
      U.pop_back();
    U.push_back(it);
    ;
    while ((int)(L).size() > 1 &&
           S[L[(int)(L).size() - 2]].cross(S[it], S[L.back()]) >= 0)
      L.pop_back();
    L.push_back(it);
    ;
  }
  return {U, L};
}
vector<int> convexHull(const vector<Point<long long> >& S) {
  vector<int> u, l;
  tie(u, l) = ulHull(S);
  if ((int)(S).size() <= 1) return u;
  if (S[u[0]] == S[u[1]]) return {0};
  l.insert(l.end(), u.rbegin() + 1, u.rend() - 1);
  return l;
}
int main() {
  int n;
  cin >> n;
  vector<Point<long long> > ps;
  vector<long long> ids;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    ps.push_back(Point<long long>(x, y));
    ids.push_back(i + 1);
  }
  string g;
  cin >> g;
  vector<int> starthull = convexHull(ps);
  cout << ids[starthull[0]] << " ";
  int cur = ids[starthull[0]];
  for (int i = 0; i < n - 2; i++) {
    vector<int> newhull = convexHull(ps);
    int idx;
    for (int j = 0; j < newhull.size(); j++) {
      if (ids[newhull[j]] == cur) {
        idx = j;
      }
    }
    int idofnext;
    if (g[i] == 'L') {
      idofnext = ids[newhull[(idx + 1) % newhull.size()]];
    } else {
      idofnext = ids[newhull[(idx - 1 + newhull.size()) % newhull.size()]];
    }
    cout << idofnext << " ";
    vector<Point<long long> > newps;
    vector<long long> newids;
    for (int j = 0; j < ids.size(); j++) {
      if (ids[j] == cur) {
        continue;
      }
      newps.push_back(ps[j]);
      newids.push_back(ids[j]);
    }
    ps = newps;
    ids = newids;
    cur = idofnext;
  }
  for (int j = 0; j < ids.size(); j++) {
    if (ids[j] == cur) {
      continue;
    }
    cout << ids[j] << endl;
  }
}
