#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
inline int tc() {
  int c = fetch();
  while (c <= 32 && c != EOF) c = fetch();
  return c;
}
}  // namespace ae86
using ae86::tc;
using ae86::ty;
const int _ = 2007;
struct points {
  long long x, y;
  points(long long x_ = 0, long long y_ = 0) { x = x_, y = y_; }
  friend points operator+(points a, points b) {
    return points(a.x + b.x, a.y + b.y);
  }
  friend points operator-(points a, points b) {
    return points(a.x - b.x, a.y - b.y);
  }
};
inline long long dox(points a, points b) { return a.x * b.x + a.y * b.y; }
inline long long cox(points a, points b) { return a.x * b.y - a.y * b.x; }
int n, ned[_] = {0};
points p[_];
int ed[_] = {0};
int ans[_] = {0};
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ty();
  for (int i = 1, a, b; i <= n; i++) a = ty(), b = ty(), p[i] = points(a, b);
  for (int i = 1; i <= n - 2; i++) ned[i] = tc() == 'R';
  int sta = 1;
  for (int i = 2; i <= n; i++)
    if (p[i].y < p[sta].y) sta = i;
  ans[1] = sta, ed[sta] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= n; j++)
      if (!ed[j] &&
          (!ans[i] || (ned[i - 1] ^ (cox(p[j] - p[ans[i - 1]],
                                         p[ans[i]] - p[ans[i - 1]]) > 0))))
        ans[i] = j;
    ed[ans[i]] = 1;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " \n"[i == n];
  return 0;
}
