#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 9;
const long long int MOD = 1e9 + 696969;
const long long INF = 1e18 + 3;
const int maxn = 2010;
inline long long int det(pair<long long int, long long int> a,
                         pair<long long int, long long int> b) {
  return a.first * b.second - a.second * b.first;
}
inline bool na_lewo(pair<long long int, long long int> a,
                    pair<long long int, long long int> b,
                    pair<long long int, long long int> c) {
  return det(a, b) + det(b, c) + det(c, a) > 0;
}
inline bool na_prawo(pair<long long int, long long int> a,
                     pair<long long int, long long int> b,
                     pair<long long int, long long int> c) {
  return det(a, b) + det(b, c) + det(c, a) < 0;
}
int p[maxn];
string s;
pair<long long int, long long int> tab[maxn];
int DL, n;
vector<int> kol;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  int id = -1;
  pair<long long int, long long int> MAX = {inf, inf};
  for (int i = (1); i <= (n); ++i) {
    cin >> tab[i].first >> tab[i].second;
    if (tab[i].first < MAX.first) {
      MAX = tab[i];
      id = i;
    } else if (tab[i].first == MAX.first && tab[i].second < MAX.second) {
      id = i;
      MAX = tab[i];
    }
  }
  cin >> s;
  p[id] = 1;
  kol.push_back(id);
  pair<long long int, long long int> curr = tab[id];
  for (int step = (0); step <= (n - 2); ++step) {
    int f = 1;
    if (s[step] == 'R') {
      while (p[f]) ++f;
      pair<long long int, long long int> sec = tab[f];
      for (int i = (f + 1); i <= (n); ++i) {
        if (p[i]) continue;
        if (na_lewo(curr, sec, tab[i])) sec = tab[i], f = i;
      }
      curr = sec;
    } else {
      while (p[f]) ++f;
      pair<long long int, long long int> sec = tab[f];
      for (int i = (f + 1); i <= (n); ++i) {
        if (p[i]) continue;
        if (na_prawo(curr, sec, tab[i])) sec = tab[i], f = i;
      }
      curr = sec;
    }
    p[f] = 1;
    kol.push_back(f);
  }
  for (auto u : kol) cout << u << ' ';
}
