#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
struct Vector {
  int x, y;
  Vector operator-(const Vector &v) const { return (Vector){x - v.x, y - v.y}; }
  long long operator*(const Vector &b) const {
    return (long long)x * b.y - (long long)y * b.x;
  }
} po[MAXN];
int n, vis[MAXN];
char str[MAXN];
int get_mx(const Vector &v) {
  int res = -1;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      if (res < 0) {
        res = i;
        continue;
      }
      if ((po[res] - v) * (po[i] - v) > 0) res = i;
    }
  return res;
}
int get_mn(const Vector &v) {
  int res = -1;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      if (res < 0) {
        res = i;
        continue;
      }
      if ((po[res] - v) * (po[i] - v) < 0) res = i;
    }
  return res;
}
void print(int x) {
  printf("%d ", x);
  vis[x] = 1;
}
int main() {
  scanf("%d", &n);
  int id = -1;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &po[i].x, &po[i].y);
    if (id < 0 || po[id].x > po[i].x) id = i;
  }
  scanf("%s", str + 1);
  print(id);
  for (int i = 1; i < n - 1; i++) {
    if (str[i] == 'R')
      id = get_mx(po[id]);
    else
      id = get_mn(po[id]);
    print(id);
  }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) print(i);
  return 0;
}
