#include <bits/stdc++.h>
using namespace std;
struct coor {
  int x, y;
} a[2005];
int i, j, m, n, ans[2005];
char s[2005];
bool used[2005];
long long maxi, temp;
long long distsqr(int x, int y) {
  return (long long)(a[x].x - a[y].x) * (a[x].x - a[y].x) +
         (long long)(a[x].y - a[y].y) * (a[x].y - a[y].y);
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
  }
  maxi = 0;
  for (i = 2; i <= n; i++) {
    temp = distsqr(1, i);
    if (temp > maxi) {
      ans[1] = i;
      maxi = temp;
    }
  }
  scanf("%s", s);
  long long x1, x2, y1, y2;
  int left, right;
  for (i = 1; i <= n; i++)
    if (i != ans[1]) {
      bool allleft = true;
      bool allright = true;
      for (j = 1; j <= n; j++) {
        if ((j != ans[1]) && (i != j)) {
          x2 = a[j].x - a[i].x;
          y2 = a[j].y - a[i].y;
          x1 = a[i].x - a[ans[1]].x;
          y1 = a[i].y - a[ans[1]].y;
          if (x2 * y1 < x1 * y2) {
            allright = false;
          } else {
            allleft = false;
          }
        }
      }
      if (allleft) {
        left = i;
      }
      if (allright) {
        right = i;
      }
    }
  if (s[0] == 'L') {
    ans[2] = left;
  } else {
    ans[2] = right;
  }
  used[ans[1]] = used[ans[2]] = true;
  for (i = 3; i <= n - 1; i++) {
    ans[i] = -1;
    if (s[i - 2] == 'L') {
      for (j = 1; j <= n; j++) {
        if (!used[j]) {
          if (ans[i] == -1) {
            ans[i] = j;
          } else {
            x1 = a[ans[i]].x - a[ans[i - 1]].x;
            y1 = a[ans[i]].y - a[ans[i - 1]].y;
            x2 = a[j].x - a[ans[i - 1]].x;
            y2 = a[j].y - a[ans[i - 1]].y;
            if (x2 * y1 > x1 * y2) {
              ans[i] = j;
            }
          }
        }
      }
    } else {
      for (j = 1; j <= n; j++) {
        if (!used[j]) {
          if (ans[i] == -1) {
            ans[i] = j;
          } else {
            x1 = a[ans[i]].x - a[ans[i - 1]].x;
            y1 = a[ans[i]].y - a[ans[i - 1]].y;
            x2 = a[j].x - a[ans[i - 1]].x;
            y2 = a[j].y - a[ans[i - 1]].y;
            if (x2 * y1 < x1 * y2) {
              ans[i] = j;
            }
          }
        }
      }
    }
    used[ans[i]] = true;
  }
  for (i = 1; i <= n; i++)
    if (!used[i]) ans[n] = i;
  for (i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
