#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n;
pair<long long, long long> node[N];
bool vis[N];
char str[N];
inline pair<long long, long long> operator-(pair<long long, long long> x,
                                            pair<long long, long long> y) {
  return make_pair(x.first - y.first, x.second - y.second);
}
inline long long Cross(pair<long long, long long> x,
                       pair<long long, long long> y) {
  return x.first * y.second - x.second * y.first;
}
inline bool Left(int x, int y, int z) {
  return Cross(node[y] - node[x], node[z] - node[y]) >= 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    node[i] = make_pair(x, y);
  }
  scanf("%s", str + 1);
  int cur = 1;
  for (int i = 1; i <= n; ++i)
    if (node[i].first < node[cur].first) cur = i;
  vis[cur] = 1;
  printf("%d ", cur);
  for (int i = 1, nxt; i <= n - 1; ++i) {
    nxt = 0;
    for (int j = 1; j <= n; ++j)
      if (!vis[j])
        if (nxt)
          nxt = (Left(cur, nxt, j) ^ (str[i] == 'L')) ? j : nxt;
        else
          nxt = j;
    cur = nxt;
    vis[cur] = 1;
    printf("%d ", cur);
  }
  return 0;
}
