#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10, mod = 1e9 + 7;
const long long inf = 1e18;
int n;
pair<int, int> p[maxn];
bool used[maxn];
pair<int, int> operator-(pair<int, int> A, pair<int, int> B) {
  return {A.first - B.first, A.second - B.second};
}
long long cross(pair<int, int> a, pair<int, int> b) {
  return 1ll * a.first * b.second - 1ll * a.second * b.first;
}
int left(pair<int, int> A) {
  int id = -1;
  for (int i = 0; i < n; i++) {
    if (used[i]) continue;
    if (id == -1) id = i;
    if (cross(p[id] - A, p[i] - A) < 0) id = i;
  }
  return id;
}
int right(pair<int, int> A) {
  int id = -1;
  for (int i = 0; i < n; i++) {
    if (used[i]) continue;
    if (id == -1) id = i;
    if (cross(p[id] - A, p[i] - A) > 0) id = i;
  }
  return id;
}
void use(int x) {
  used[x] = 1;
  cout << x + 1 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int id = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    if (p[id].first > p[i].first) id = i;
  }
  string s;
  cin >> s;
  use(id);
  pair<int, int> A = p[id];
  for (int i = 0; i < n - 2; i++) {
    int id = s[i] == 'L' ? left(A) : right(A);
    use(id);
    A = p[id];
  }
  use(left(A));
  return cout << endl, 0;
}
