#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n;
bool flag[N];
string s;
pair<int, int> point[N];
vector<int> rez;
bool ccw(pair<int, int> o, pair<int, int> a, pair<int, int> b) {
  long long u1 = a.first - o.first, v1 = a.second - o.second;
  long long u2 = b.first - a.first, v2 = b.second - a.second;
  if (u1 * v2 - u2 * v1 == 0) return (b.first < a.first);
  return (u1 * v2 - u2 * v1 > 0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int mn = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> point[i].first >> point[i].second;
    if (point[i].first < point[mn].first) mn = i;
  }
  cin >> s;
  flag[mn] = true;
  rez.push_back(mn);
  for (auto &ch : s) {
    int nxt = -1;
    for (int i = 1; i <= n; ++i)
      if (!flag[i]) {
        if (nxt == -1) {
          nxt = i;
          continue;
        }
        if (ch == 'L') {
          if (!ccw(point[rez.back()], point[nxt], point[i])) nxt = i;
        } else if (ccw(point[rez.back()], point[nxt], point[i]))
          nxt = i;
      }
    flag[nxt] = true;
    rez.push_back(nxt);
  }
  for (int i = 1; i <= n; ++i)
    if (!flag[i]) rez.push_back(i);
  for (auto &first : rez) cout << first << ' ';
  return 0;
}
