#include <bits/stdc++.h>
using namespace std;
int n, m;
struct poi {
  int x, y;
  poi() : x(0), y(0) {}
  poi(int x, int y) : x(x), y(y) {}
  poi operator-(poi a) { return poi(x - a.x, y - a.y); }
} A[200006];
long long det(poi a, poi b) { return a.x * 1ll * b.y - a.y * 1ll * b.x; }
int p[200006], vs[200006];
char S[200006];
void solve() {
  cin >> n;
  pair<int, int> mx = make_pair(-2e9, 0);
  for (int i = (1), iend = (n); i <= iend; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    A[i] = (poi){x, y};
    mx = max(mx, make_pair(x, i));
  }
  vs[mx.second] = 1, p[1] = mx.second;
  scanf("%s", S + 2);
  for (int i = (2), iend = (n - 1); i <= iend; ++i) {
    for (int j = (1), jend = (n); j <= jend; ++j)
      if ((!vs[j] &&
           (!p[i] || ((S[i] == 'L' &&
                       det(A[j] - A[p[i - 1]], A[p[i]] - A[p[i - 1]]) > 0) ||
                      (S[i] == 'R' &&
                       det(A[j] - A[p[i - 1]], A[p[i]] - A[p[i - 1]]) < 0))))) {
        p[i] = j;
      }
    vs[p[i]] = 1;
  }
  for (int j = (1), jend = (n); j <= jend; ++j)
    if (!vs[j]) p[n] = j;
  for (int i = (1), iend = (n); i <= iend; ++i) printf("%d ", p[i]);
}
signed main() { solve(); }
