#include <bits/stdc++.h>
using namespace std;
long long n, sav, mn = 1e9;
struct point {
  long long x, y, uz;
} p[2005];
string s;
int det(point A, point B, point C) {
  if (A.x * B.y + A.y * C.x + B.x * C.y - A.x * C.y - A.y * B.x - B.y * C.x < 0)
    return -1;
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].x >> p[i].y;
    if (p[i].y < mn) {
      mn = p[i].y;
      sav = i;
    }
  }
  cin >> s;
  p[sav].uz = 1;
  cout << sav << ' ';
  for (int i = 0; i < s.size(); i++) {
    int crt = 1, j, sgn;
    while (p[crt].uz) crt++;
    j = crt + 1;
    if (s[i] == 'R')
      sgn = 1;
    else
      sgn = -1;
    while (j <= n) {
      while (j <= n && p[j].uz) j++;
      if (j > n) break;
      if (det(p[sav], p[crt], p[j]) == sgn) crt = j;
      j++;
    }
    sav = crt;
    p[crt].uz = 1;
    cout << sav << ' ';
  }
  for (int i = 1; i <= n; i++)
    if (!p[i].uz) cout << i << ' ';
  return 0;
}
