#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
  double len;
  int id;
} s[10100], pt[10100], Point_A;
int num = 0;
double Cross(point a, point b, point c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
double dis(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void Find(int n) {
  int temp = 0;
  point a = pt[0];
  for (int i = (0); i < (n); i++) {
    if (pt[i].y < a.y || pt[i].y == a.y && pt[i].x < a.x) {
      a = pt[i];
      temp = i;
    }
  }
  pt[temp] = pt[0];
  pt[0] = a;
  Point_A = a;
}
bool cmp(point a, point b) {
  double x = Cross(Point_A, a, b);
  if (x > 0)
    return true;
  else if (x < 0)
    return false;
  a.len = dis(Point_A, a);
  b.len = dis(Point_A, b);
  return a.len < b.len;
}
int Graham(int n) {
  int top = 1;
  s[0] = pt[0];
  s[1] = pt[1];
  pt[n] = pt[0];
  for (int i = (2); i < (n + 1); i++) {
    while (Cross(s[top - 1], s[top], pt[i]) <= 0 && top >= 1) {
      top--;
    }
    s[++top] = pt[i];
  }
  return top;
}
int init(int n) {
  Find(n);
  sort(pt, pt + n, cmp);
  num = Graham(n);
}
double Perimeter() {
  double sum = 0;
  for (int i = (1); i < (num); i++) {
    sum += dis(s[i - 1], s[i]);
  }
  sum += dis(s[num - 1], s[0]);
  return sum;
}
double Area() {
  double sum = 0;
  for (int i = (1); i < (num); i++) {
    sum += Cross(s[0], s[i], s[i + 1]);
  }
  sum = fabs(sum) / 2;
  return sum;
}
long long cr(int x1, int y1, int x2, int y2) {
  return 1ll * x1 * y2 - 1ll * x2 * y1;
}
long long cross(int i, int j, int k) {
  return cr(pt[j].x - pt[i].x, pt[j].y - pt[i].y, pt[k].x - pt[i].x,
            pt[k].y - pt[i].y);
}
int ans[1000000 + 10];
bool vis[1000000 + 10];
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n;
  cin >> n;
  memset(ans, -1, sizeof(ans));
  for (int i = (0); i < (n); i++) {
    cin >> pt[i].x >> pt[i].y;
    if (ans[0] == -1 || pt[i].x < pt[ans[0]].x) ans[0] = i;
  }
  string ss;
  cin >> ss;
  vis[ans[0]] = true;
  for (int i = (0); i < (n - 2); i++) {
    for (int j = (0); j < (n); j++) {
      if (vis[j]) continue;
      if (ans[i + 1] == -1 ||
          ss[i] == 'L' && cross(ans[i], j, ans[i + 1]) > 0 ||
          ss[i] == 'R' && cross(ans[i], j, ans[i + 1]) < 0)
        ans[i + 1] = j;
    }
    vis[ans[i + 1]] = true;
  }
  for (int i = (0); i < (n - 1); i++) {
    cout << ans[i] + 1 << " ";
  }
  for (int i = (0); i < (n); i++) {
    if (!vis[i]) cout << i + 1 << "\n";
  }
  return 0;
}
