#include <bits/stdc++.h>
const int maxn = 2005;
struct Vec {
  long long x, y;
  Vec(long long x_ = 0, long long y_ = 0) : x(x_), y(y_) {}
  Vec operator+(const Vec& rhs) const { return Vec(x + rhs.x, y + rhs.y); }
  Vec operator-(const Vec& rhs) const { return Vec(x - rhs.x, y - rhs.y); }
  long long dot(const Vec& rhs) const { return x * rhs.x + y * rhs.y; }
  long long cross(const Vec& rhs) const { return x * rhs.y - y * rhs.x; }
  double mag() const { return sqrt(x * x + y * y); }
  double getAng(const Vec& rhs) const {
    return (double)dot(rhs) / (mag() * rhs.mag());
  }
} a[maxn];
int n, d[maxn], p[maxn];
char dir[maxn], book[maxn];
bool les(long long a, long long b) { return a < b; }
bool grt(long long a, long long b) { return a > b; }
bool les(double a, double b) { return a < b; }
bool grt(double a, double b) { return a > b; }
typedef bool CMPFUN_LONG(long long, long long);
const CMPFUN_LONG* cmp_long[2] = {les, grt};
typedef bool CMPFUN_DOUBLE(long long, long long);
const CMPFUN_DOUBLE* cmp_double[2] = {les, grt};
const double inf[2] = {100.0, -100.0};
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld%lld", &a[i].x, &a[i].y);
  }
  scanf("%s", dir + 1);
  for (int i = 1; i < n - 1; ++i) {
    d[i] = (dir[i] == 'R');
  }
  int mostBotID = 1;
  for (int i = 2; i <= n; ++i) {
    if (a[mostBotID].y > a[i].y) {
      mostBotID = i;
    }
  }
  p[1] = mostBotID;
  book[p[1]] = 1;
  for (int i = 1; i < n - 1; ++i) {
    int jd = -1;
    Vec last, tv;
    for (int j = 1; j <= n; ++j) {
      if (book[j]) {
        continue;
      }
      if (jd == -1) {
        jd = j;
        last = a[j] - a[p[i]];
      } else {
        tv = a[j] - a[p[i]];
        if (cmp_long[d[i]](last.cross(tv), 0)) {
          jd = j;
          last = a[j] - a[p[i]];
        }
      }
    }
    p[i + 1] = jd;
    book[jd] = 1;
  }
  for (int i = 1; i < n; ++i) {
    printf("%d ", p[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (!book[i]) {
      printf("%d\n", i);
      break;
    }
  }
  return 0;
}
