#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y;
  long long pos;
  bool flag;
} p[2005];
long long read() {
  char ch = getchar();
  while (ch != 'L' && ch != 'R') ch = getchar();
  return ch == 'L';
}
double cross(double x1, double y1, double x2, double y2) {
  return (x1 * y2 - x2 * y1);
}
double compare(node a, node b, node c) {
  return cross((b.x - a.x), (b.y - a.y), (c.x - a.x), (c.y - a.y));
}
bool cmp(node a, node b) {
  if (a.y != b.y) return a.y < b.y;
  return a.x < b.x;
}
long long n, a[2005], ans[2005];
signed main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
    p[i].pos = i, p[i].flag = 1;
  }
  for (long long i = 1; i <= n - 2; i++) a[i] = read();
  sort(p + 1, p + n + 1, cmp);
  ans[1] = p[1].pos, p[1].flag = 0;
  long long t = 1, la = 1;
  for (long long i = 1; i <= n - 2; i++) {
    if (a[i])
      for (long long j = 1; j <= n; j++) {
        if (!p[j].flag) continue;
        if (!p[t].flag || compare(p[la], p[j], p[t]) > 0) t = j;
      }
    else
      for (long long j = 1; j <= n; j++) {
        if (!p[j].flag) continue;
        if (!p[t].flag || compare(p[la], p[j], p[t]) < 0) t = j;
      }
    ans[i + 1] = p[t].pos, p[t].flag = 0, la = t;
  }
  for (long long i = 1; i <= n; i++)
    if (p[i].flag) {
      ans[n] = p[i].pos;
      break;
    }
  for (long long i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
