#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int w = 0, x = 0;
  char c = getchar();
  while (!isdigit(c)) w |= c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
  return w ? -x : x;
}
namespace star {
const int maxn = 2005;
int n, p[maxn];
bool vis[maxn];
struct vec {
  int x, y;
  vec(int x = 0, int y = 0) : x(x), y(y) {}
  vec operator+(const vec &a) const { return vec(x + a.x, y + a.y); }
  vec operator-(const vec &a) const { return vec(x - a.x, y - a.y); }
  long long operator*(const vec &a) const {
    return 1ll * x * a.y - 1ll * y * a.x;
  }
} a[maxn];
inline void work() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i].x = read(), a[i].y = read();
    if (!p[1] or a[i].x < a[p[1]].x) p[1] = i;
  }
  vis[p[1]] = true;
  for (int op, i = 2; i <= n; i++) {
    char c;
    scanf("%c", &c), op = c == 'L';
    for (int j = 1; j <= n; j++)
      if (!vis[j])
        if (!p[i] or
            op and (a[j] - a[p[i - 1]]) * (a[p[i]] - a[p[i - 1]]) > 0 or
            !op and (a[j] - a[p[i - 1]]) * (a[p[i]] - a[p[i - 1]]) < 0)
          p[i] = j;
    vis[p[i]] = true;
  }
  for (int i = 1; i <= n; i++) printf("%d ", p[i]);
}
}  // namespace star
signed main() {
  star::work();
  return 0;
}
