#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, p[N];
long long x[N], y[N];
char s[N];
bool vis[N];
long long cross(long long x1, long long y1, long long x2, long long y2) {
  return x1 * y2 - x2 * y1;
}
long long check(int i, int j, int k) {
  return cross(x[j] - x[i], y[j] - y[i], x[k] - x[i], y[k] - y[i]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &x[i], &y[i]);
    if (!p[1] || x[i] < x[p[1]]) p[1] = i;
  }
  scanf("%s", s + 1);
  vis[p[1]] = 1;
  for (int i = 1; i <= n - 2; i++) {
    for (int j = 1; j <= n; j++) {
      if (vis[j]) continue;
      if (!p[i + 1] || (s[i] == 'L' && check(p[i], j, p[i + 1]) > 0) ||
          (s[i] == 'R' && check(p[i], j, p[i + 1]) < 0))
        p[i + 1] = j;
    }
    vis[p[i + 1]] = 1;
  }
  for (int i = 1; i < n; i++) printf("%d ", p[i]);
  for (int i = 1; i <= n; i++)
    if (!vis[i]) printf("%d\n", i);
  return 0;
}
