#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
const int inf = 0x3f3f3f3f;
const long long inf_ll = 0x3f3f3f3f3f3f3f3fLL;
inline long long cross(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
  return 1ll * (b.first - a.first) * (c.second - b.second) -
         1ll * (b.second - a.second) * (c.first - b.first);
}
const int maxn = 2e3 + 100;
char s[maxn];
int n;
pair<int, int> points[maxn];
bool used[maxn];
int main() {
  do {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
  } while (0);
  cin >> n;
  for (int i = 0, _ = n; i < _; i++) {
    int x, y;
    cin >> x >> y;
    points[i] = make_pair(x, y);
  }
  cin >> s;
  int now = 0;
  for (int i = 1, _ = n; i < _; i++) {
    if (points[i].first < points[now].first ||
        points[i].first == points[now].first &&
            points[i].second < points[now].second) {
      now = i;
    }
  }
  cout << now + 1 << ' ';
  used[now] = 1;
  for (int i = 0, _ = n - 2; i < _; i++) {
    int nxt = 0;
    while (used[nxt]) nxt++;
    for (int j = nxt, _ = n; j < _; j++) {
      if (used[j]) continue;
      if (s[i] == 'L' && cross(points[now], points[nxt], points[j]) < 0)
        nxt = j;
      if (s[i] == 'R' && cross(points[now], points[nxt], points[j]) > 0)
        nxt = j;
    }
    used[nxt] = 1;
    now = nxt;
    cout << now + 1 << ' ';
  }
  for (int i = 0, _ = n; i < _; i++) {
    if (used[i]) continue;
    cout << i + 1 << endl;
  }
  return 0;
}
