#include <bits/stdc++.h>
using namespace std;
const int maxn = 2222;
struct Point {
  long long x, y;
  Point(long long xp = 0, long long yp = 0) : x(xp), y(yp) {}
  Point operator-(const Point& rhs) { return Point(x - rhs.x, y - rhs.y); }
  void scan() { scanf("%lld%lld", &x, &y); }
} p[maxn];
int n, vis[maxn], cur;
char s[maxn];
long long cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
bool Left(Point pt, Point O, Point A) { return cross(A - O, pt - O) > 0; }
bool Right(Point pt, Point O, Point A) { return cross(A - O, pt - O) < 0; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) p[i].scan();
  scanf("%s", s + 1);
  cur = 1;
  for (int i = 1; i <= n; ++i)
    if (p[i].y < p[cur].y) cur = i;
  vector<int> ans;
  ans.push_back(cur);
  for (int i = 1; i <= n - 2; ++i) {
    vis[cur] = true;
    int has = false, idx = -1;
    for (int j = 1; j <= n; ++j)
      if (!vis[j]) {
        if (!has)
          has = true, idx = j;
        else {
          if (s[i] == 'L' && Right(p[j], p[cur], p[idx]))
            idx = j;
          else if (s[i] == 'R' && Left(p[j], p[cur], p[idx]))
            idx = j;
        }
      }
    cur = idx;
    vis[cur] = true;
    ans.push_back(cur);
  }
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) ans.push_back(i);
  for (auto g : ans) printf("%d ", g);
  printf("\n");
  return 0;
}
